Firebase Storage is giving StorageException while trying to upload images

后端 未结 14 1923
北海茫月
北海茫月 2021-01-13 03:10

I have been trying to upload images to the new firebase storage service . It is throwing StorageException

E/StorageException: StorageException has occ

相关标签:
14条回答
  • 2021-01-13 04:03
    ```private StorageReference mStorage;
    final StorageReference filepath = mStorage.child("log_images");
    Task<Uri> downloadurl = filepath.getDownloadUrl();```
    

    check the above and last make sure the yourlatest for latest version google search (android and firebase) 'com.google.firebase:firebase-storage:19.1.1'

    0 讨论(0)
  • 2021-01-13 04:04

    This problem may cause of authentication while uploading in firestore . You have to remove authentication part in the code of the rules of firebase storage.

    Remove this and publish :if request.auth != null;

    0 讨论(0)
  • 2021-01-13 04:08

    This Sorted me out, not a single line of code change ;) , All I needed to do was to update the firebase-storage lib. In my case it was 'com.google.firebase:firebase-storage:16.4.0' and after updating it to 'com.google.firebase:firebase-storage:17.0.0' everything start working fine again.

    0 讨论(0)
  • 2021-01-13 04:10

    Enable anonymous authentication in firebase console.

    0 讨论(0)
  • 2021-01-13 04:11

    I had encountered this issue, when I had not created the referenced folder/bucket in the Firebase Storage. Unlike Firebase Database, I think (I am not sure yet), the Storage reference will not create the bucket if it doesn't exist in the first place. So, create a folder first, and then try again.

    0 讨论(0)
  • 2021-01-13 04:12

    I was also facing the same,

    1. Update all the suggested dependencies from project structure
    2. Update Google play services
    0 讨论(0)
提交回复
热议问题