StorageException: An unknown error occurred, please check the HTTP result code and inner exception for server response

前端 未结 13 2088
执念已碎
执念已碎 2021-02-09 20:19

I use Firebase Storage to upfile. But it does not work THIS IS MY CODE.

FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference sto         


        
13条回答
  •  盖世英雄少女心
    2021-02-09 20:42

    May be this is the wrong path bug but in my case resolve this here is the example

    i use this code then i received error

    public static StorageReference getChildProfileStorage(String vid){
        StorageReference storageReference= FirebaseStorage.getInstance().getReference();
        storageReference.child("ParentDataStore").child(CurrentUser.getInstance().getEmail())
                .child("ChildDataStore").child(vid);
    
        return storageReference;
    }
    

    here is the line that solve my problem

    public static StorageReference getStudentProfileStorage(String vid){
        StorageReference storageReference= FirebaseStorage.getInstance().getReference("ParentDataStore")
                .child("StudentDataStore").child(vid).child("profile");
        return storageReference;
    }
    

提交回复
热议问题