[storage][js] automatically attempt to call `decodeURI` on `putFile` paths
This commit is contained in:
parent
be048e9d39
commit
259f8f8d1b
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue