mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-11 11:29:13 +08:00
[storage][js] automatically attempt to call decodeURI on putFile paths
This commit is contained in:
@@ -96,7 +96,8 @@ export default class StorageReference extends ReferenceBase {
|
||||
* @return {Promise}
|
||||
*/
|
||||
putFile(filePath: Object, metadata: Object = {}): Promise<Object> {
|
||||
const _filePath = filePath.replace('file://', '');
|
||||
let _filePath = filePath.replace('file://', '');
|
||||
if (_filePath.includes('%')) _filePath = decodeURI(_filePath);
|
||||
return new StorageTask(
|
||||
UPLOAD_TASK,
|
||||
getNativeModule(this._storage).putFile(this.path, _filePath, metadata),
|
||||
|
||||
Reference in New Issue
Block a user