From f8b0f82dfa600f2c43ce90fb44ed94d5a07c7514 Mon Sep 17 00:00:00 2001 From: jason-ong Date: Fri, 21 Aug 2015 17:35:42 +0800 Subject: [PATCH] CB-9790 Align FileUploadOptions fileName and mimeType default parameter values to the docs on iOS To match the documentation for FileUpload, change fileName default value to "image.jpg" change mimeType default value to "image/jpg" github: close #98 --- src/ios/CDVFileTransfer.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVFileTransfer.m b/src/ios/CDVFileTransfer.m index 3113c26..2655e48 100644 --- a/src/ios/CDVFileTransfer.m +++ b/src/ios/CDVFileTransfer.m @@ -143,8 +143,8 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream) NSString* target = [command argumentAtIndex:0]; NSString* server = [command argumentAtIndex:1]; NSString* fileKey = [command argumentAtIndex:2 withDefault:@"file"]; - NSString* fileName = [command argumentAtIndex:3 withDefault:@"no-filename"]; - NSString* mimeType = [command argumentAtIndex:4 withDefault:nil]; + NSString* fileName = [command argumentAtIndex:3 withDefault:@"image.jpg"]; + NSString* mimeType = [command argumentAtIndex:4 withDefault:@"image/jpeg"]; NSDictionary* options = [command argumentAtIndex:5 withDefault:nil]; // BOOL trustAllHosts = [[command argumentAtIndex:6 withDefault:[NSNumber numberWithBool:YES]] boolValue]; // allow self-signed certs BOOL chunkedMode = [[command argumentAtIndex:7 withDefault:[NSNumber numberWithBool:YES]] boolValue];