After selecting the file from iCloud using Iphone Device or Simulator, when i am try to upload this file getting file not exist error.
Any help please ?
Have you asserted that the file was indeed copied first from iCloud to the temporary folder?
The URI I receive is something like
file:///private/var/mobile/Containers/Data/Application/\ Then I try to pass it to RNFetchBlob for upload. I'm not iOS dev, so I digging deeper in order to understand if I'm missing a permission or if RNFetchBlob expect another URI format. @rajeshkos did you solved the issue?
I may have found the problem. The document I was picking had a space on its name and the received file path was replacing it by %20. Consequently, the lib I was using to upload the file was looking for the wrong file.
More generally this can be an issue with all chars that get URL encoded. Using decodeURIComponent did the trick for me.
This is similar to error https://github.com/Elyx0/react-native-document-picker/issues/25.
Also see: https://github.com/joltup/rn-fetch-blob/issues/116
That resolved this error for me.
closing in favor do #368
Most helpful comment
I may have found the problem. The document I was picking had a space on its name and the received file path was replacing it by
%20. Consequently, the lib I was using to upload the file was looking for the wrong file.More generally this can be an issue with all chars that get URL encoded. Using
decodeURIComponentdid the trick for me.