converting image file on disk to NSString for use in HTTP request
converting image file on disk to NSString for use in HTTP request
- Subject: converting image file on disk to NSString for use in HTTP request
- From: "Thomas Haynes" <email@hidden>
- Date: Mon, 2 Jul 2007 16:57:41 -0700
Hi there.
I'm using NSMutableURLRequest to send HTTP requests to a script that
handles a multipart form. One part of that form is an image uploader,
so I'm sending
------WebKitFormBoundaryFo/VfTYBSYwX2yJD
Content-Disposition: form-data; name="imagefile"; filename="2.jpg"
Content-Type: image/jpeg
<<image data here>>
because that's what I see the form actually POSTing when I use my
sniffer to watch the request. The only thing is that I can't figure
out the right way to get from the file I have on disk to the <<image
data here>> part. When I watch the image in the sniffer, I can read
the camera type and some other information, and then it's just
gibberish (obviously). But how do I create my own gibberish that the
HTTP server can understand?
Thanks.
Tom Haynes
--
Tom Haynes
(713) 826 4175
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden