Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Uploader.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ - (void)uploadFiles:(RNFSUploadParams*)params

// set headers
NSString *formBoundaryString = [self generateBoundaryString];
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", formBoundaryString];
[req setValue:contentType forHTTPHeaderField:@"Content-Type"];
if (binaryStreamOnly){
NSString *contentType = @"application/x-www-form-urlencoded";
[req setValue:contentType forHTTPHeaderField:@"Content-Type"];
} else {
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", formBoundaryString];
[req setValue:contentType forHTTPHeaderField:@"Content-Type"];
}
for (NSString *key in _params.headers) {
id val = [_params.headers objectForKey:key];
if ([val respondsToSelector:@selector(stringValue)]) {
Expand Down