joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.84k stars 787 forks source link

RNFetchBlob.fs.exists return false after file renamed back to original file name #615

Open user14045 opened 4 years ago

user14045 commented 4 years ago

Hello, I try to import file using react-native-document-picker in Android. I am using RN 0.61.5, react-native-document-picker 3.4.0, and rn-fetch-blob 0.12.0 After I choose the file, the uri stored in a state. Then, I try to invoke a function to validate wether the file still exist or not using RNFetchBlob.fs.exists.

First trial, after I choose the file, RNFetchBlob.fs.exists(this.state.uri) return true. Then, I try to rename the file in my device storage. After that, I try to invoke RNFetchBlob.fs.exists again and it return false (as expected). Then, I rename back to the original file name. But this time, when I invoke RNFetchBlob.fs.exists, it keep return false. And, this is happen only with mp4 file (so far). I've try the same scenario for zip, pdf and mp3 and all of them is work as expected.

If I try RNFetchBlob.fs.stat after the file renamed back to the original name, it return failed to stat path `null` because it does not exist or it is not a folder. I've try to clear the app cache but still not working.

Any idea what's going wrong here?

ghost commented 3 years ago

Hello, facing same issue. Any solution for this

fukemy commented 2 years ago

any solution?