-
-
Notifications
You must be signed in to change notification settings - Fork 449
Permission Denial Error when trying to upload file picked from ExternalStorageDirectoryPath to fireStore storage #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Im facing same issue here someone please help us please. Upload to Firebase Storage
|
its really annoying that we have to deal with this |
hello @Saidfatah
you're more than welcome to investigate this and open a PR with a fix, it'll be appreciated, thank you |
If the solution below doesn't work, have a look at other comment. It perfectly works : #387 (comment)Firebase Storage is not suitable with content://com uri. So firstly do After that use this function below to get the uri which is suitable for firebase storage
stat.path returns "data/0/..." path for the given uri. At the end have a look at the main code below
We get the suitable uri from this.getPathForFirebaseStorage(document.uri) function. document.uri is res.uri in your code and that function returns a new uri which is called as documentUri. Put the documentUri to the storage function. Briefly ; I think it works. I have faced with that problem and RNFetchBlob solved it. |
exist another post about this, recently i found this packages as alternative to rn-fetch-blob https://github.com/flyerhq/react-native-android-uri-path it works for me |
When doing that I get this error:
Despite having requested |
well thankyou or the suggestion in my case my files are very small 1mb to 20mb |
You can also try that :
|
You can have a look at that comment, it perfectly works. I changed my rn-fetch code to that one. I think it is good for your error |
it's work |
hello! It appears that the original issue has been resolved, so I'm going to close this. Looking at the comments, it seems that the |
I'm trying to upload a .xlsx file to firestore storage ,I'm using react-native-document-picker to pick the file from
ExternalStorageDirectoryPath
so when just log the files uri I don't get the error but as soon as try to upload the file it throws the error .relevant code :
`
I already included the required permissions in my
AndroidManifest.xml
file and rebuilt the project , although From what I've read, MANAGE_DOCUMENTS is a "signature" permission and cannot be added to the manifest.xml or granted by the react native android permission API.<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>
the Error I'm getting :
The text was updated successfully, but these errors were encountered: