Firebase Storage is giving StorageException while trying to upload images

后端 未结 14 2076
北海茫月
北海茫月 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:15

    In the google firebase this type of StorageException are commonly caused because of wrong StorageReference reference .

    FirebaseStorage storage = FirebaseStorage.getInstance();
    StorageReference storageRef = storage.getReferenceFromUrl("gs://");
    
    // Create a reference to "file"
    StorageReference mountainsRef = storageRef.child("file.jpg");
    

    Make sure the reference to the file is made correctly.


    Documentation Refrences

    Details about creating Storage reference can be found in here

    Details about the Storage Exception codes can be found in here for further refrences

提交回复
热议问题