Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Can't upload a file #7

Open
dyaacov opened this issue Jan 26, 2013 · 0 comments
Open

Can't upload a file #7

dyaacov opened this issue Jan 26, 2013 · 0 comments

Comments

@dyaacov
Copy link

dyaacov commented Jan 26, 2013

Hi,
I'm trying to upload a file from my iPhone ios 6.
In wireshark, I see that the data is missing, I only see Content-Disposition and Content-Type but no data.
Content-Disposition: form-data; name="file"; filename="mypic.jpeg"\r\n
Content-Type: image/jpeg\r\n\r\n
and after that - NOTHING

Here is my code:
RFRequest* r = [RFRequest requestWithURL:[NSURL URLWithString:url] type:RFRequestMethodPost bodyContentType:RFRequestBodyTypeMultiPartFormData resourcePathComponents:nil];

//add files...
NSData *data = UIImageJPEGRepresentation(self.selectedImage, 1.0);
[r addData:data withContentType:@"image/jpeg" forKey:@"mypic.jpeg"];
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant