Issue with spaces in file names
What react-native version are you using?
0.68.0
What react-native-pdf version are you using?
6.5.0
What platform does your issue occur on? (android/ios/both) iOS
Describe your issue as precisely as possible :
- Try previewing a PDF file with a space in the name
It returns load error
I am not familiar with Native code, but this is my diagnosis so far (with help from parasharrajat)
It seems that on Android, we parse the file path, however, on iOs returns a further encoded URI string which throws an error.
I checked what this line returns if it's given an encoded URI string of: ...Sample%20file.pdf and it is: ...Sample%2520file.pdf
This is the reason why for any file with a space in its name, the pdf ref is null.
I have the same problem on iOS, even if I get uri the file isn't displayed, just without spaces.
Is this duplicated? https://github.com/wonday/react-native-pdf/issues/488