React-native-document-picker: Spaces in filename

Created on 1 Feb 2017  路  5Comments  路  Source: rnmods/react-native-document-picker

Hi @Elyx0 @KinanKazmi
I'm trying to upload file to my server (due to your example)
The example file in attachments
archive images.zip

I got error from RNFS library during the preparing real path

<Warning>: Failed to open target file at path: file:///Users/anastasiiak/Library/Developer/CoreSimulator/Devices/deviceID/data/Containers/Data/Application/appID/tmp/org.app/archive%20images.zip

Could you explain how to fix this problem?
Thanks

Most helpful comment

Try: decodeURIComponent(name) for the name of the file.

All 5 comments

Were you able to figure this out? Having the same issue. Files with no spaces works but files with spaces don't.

Try: decodeURIComponent(name) for the name of the file.

@St1ma decodeURIComponent(name) solved your problem?

@sibelius Positive
@KristoferEng Thank you for response

On iphone8 and above, I needed to

imafeRef.put(decodeURIComponent(uri), { contentType: mime })

for it to upload files with spaces in the name.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrey-shostik picture andrey-shostik  路  9Comments

kalyanijamunkar10 picture kalyanijamunkar10  路  5Comments

vsrinivas150283 picture vsrinivas150283  路  3Comments

IvanCaceres picture IvanCaceres  路  6Comments

FrankFundel picture FrankFundel  路  5Comments