[ios][storage] Better support uploading files with a file:// prefix

This commit is contained in:
Chris Bianca 2017-05-22 15:25:35 +01:00
parent 22a6ac1b07
commit 5120bc8b46
1 changed files with 2 additions and 2 deletions

View File

@ -302,8 +302,8 @@ RCT_EXPORT_METHOD(putFile:(NSString *) path localPath:(NSString *)localPath meta
}];
}
} else {
NSURL *fileUrl = [NSURL fileURLWithPath:localPath];
[self uploadFile:fileUrl metadata:metadata path:path resolver:resolve rejecter:reject];
NSData *data = [[NSFileManager defaultManager] contentsAtPath:localPath];
[self uploadData:data metadata:metadata path:path resolver:resolve rejecter:reject];
}
}