0

I am using the firebase realtime database. User want to delete his Complete data from Firebase of particular id.Data from Authentication, Database is deleted. But not able to delete his images complete folder from Firebase storage. it can deleted by only particular file name not exactly the complete folder.

private  void  deleteUserStorage(){
     StorageReference storageReference;
    storageReference = FirebaseStorage.getInstance().getReference().child(mUid);
    storageReference.delete().addOnSuccessListener(new OnSuccessListener<Void>() {
        @Override
        public void onSuccess(Void aVoid) {
            Toast.makeText(UserDetails.this, "got success", Toast.LENGTH_SHORT).show();
        }
    }).addOnFailureListener(new OnFailureListener() {
        @Override
        public void onFailure(@NonNull Exception e) {
            Log.e("not",""+e);
        }
    });

}

com.google.firebase.storage.StorageException: Object does not exist at location

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

1 Answers1

0

I think you have to delete the files one by one. In firebase Documentation, you can check only gave the instruction to delete only one file not given any instructions to delete all the folder.