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

Can't upload a file #7

Description

@dyaacov

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"];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions