Merge pull request #165 from mgp/patch-1
"Content-disposition" should be "form-data" for a single file.
This commit is contained in:
commit
c4c6d41fc8
1 changed files with 1 additions and 1 deletions
|
|
@ -451,7 +451,7 @@ static inline NSString * AFMultipartFormFinalBoundary() {
|
|||
|
||||
- (void)appendPartWithFileData:(NSData *)data name:(NSString *)name fileName:(NSString *)fileName mimeType:(NSString *)mimeType {
|
||||
NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
|
||||
[mutableHeaders setValue:[NSString stringWithFormat:@"file; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
|
||||
[mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
|
||||
[mutableHeaders setValue:mimeType forKey:@"Content-Type"];
|
||||
|
||||
[self appendPartWithHeaders:mutableHeaders body:data];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue