-
Notifications
You must be signed in to change notification settings - Fork 3
Post file and extra parameters #4
Comments
Hey Ola, Haven't tried your example but it looks cool on the first look. You say only 1 param gets through, which one? But yes, your logic is all good and this is the correct way of adding files and key/value params. Cheers |
I'm facing the same problem. I wanna send (HTTP POST) a png file and other string parameters. But when I post it, every parameter has a string concat "ThIs_Is_tHe_bouNdaRY_$". I only wanna send param = value and it is sending a crazy set of data. Can you help me? Log of my sever: 2012-06-13 21:06:29 --- INFO: **** **** **** KLOG START **** **** **** **** b------------ThIs_Is_tHe_bouNdaRY_$ plist------------ThIs_Is_tHe_bouNdaRY_$ 218511044bee5c4e405ec7217b02df8c 2012-06-13 21:06:29 --- INFO: **** **** **** KLOG END **** **** **** **** **** |
For multi-part form data it is required to add separators/boundaries so the output looks correct to me afaics. Is your API open for public? If so, I can check... |
Yeah, my server is expecting a multipart/form-data. We are using something like this: |
Really can't see what could be wrong (if anything)... |
All param has a pattern: PARAM_VALUE ------------ThIsIs_tHe_bouNdaRY$ but, the first param(latitude) hasn't this pattern. Maybe it is the problem. |
RFRequest * r=[[RFRequest requestWithURL:url type:RFRequestMethodPost bodyContentType:RFRequestBodyTypeMultiPartFormData resourcePathComponents:nil, nil]retain];
// [r addParam:@"http://118.186.136.13/headpic/default/32.jpg" forKey:@"syspic"]; @"multipart/form-data"; As a form, upload a picture and a few key / volue, the results failed, do not know why, ask for help? ? |
Hi Ivan!
Thank you for the framework.
How can I add upload a file and additional parameters to the same request?
I've got the following code:
Only one parameter is sent to the Rails API.
What am I missing?
Thanks
/ Ola
The text was updated successfully, but these errors were encountered: