[ios][storage] Better support uploading files with a file:// prefix
This commit is contained in:
parent
22a6ac1b07
commit
5120bc8b46
|
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue