itinance / react-native-fs

Native filesystem access for react-native
MIT License
4.95k stars 978 forks source link

moveFile can't deal with paths with uri syntax #274

Open compojoom opened 7 years ago

compojoom commented 7 years ago

This library: https://github.com/ivpusic/react-native-image-crop-picker

returns an image object that has a path property that starts with file:///storage on android. on iOS the path is just /Data...

using the returned path from the component with moveFile results in an error. The file can't be found. Now ok, I can replace file:// with an empty string and then moveFile finds the file on Android as well, but the funny thing is that if I want to use the new file with react native Image I have to again add file:// to the file, otherwise the Image component doesn't recognise the file as local.

Shouldn't we support operations with uri paths on Android?

SanchiSinghal commented 7 years ago

Hey @compojoom . As u mentioned in the issue, u have moved the file to a folder. So can you see the folder and the moved images in the gallery of the Android Phone system.

I can't see the folder and not the images and not even thumbnails.But the folder and images are seen in the Phone-Storage/Pictures/Folder-name folder. Now, if i copy paste any other image in this folder from other folder I can see it's thumbnail and even the folder in the gallery but with only this single photo(copy-pasted one)

@itinance