I want display image in imageView, that\'s what I\'m doing: I\'m using FirebaseUI to display images from FireBase Storage.
FirebaseStorage storageDisplayImg;
You can try to wait some time between the upload of the image and the recuperation of the image. That worked in my issue like this. Wish you a good luck.
You can Simply show the image in two way using Glide method. If we want to access below method, We must to change the Firebase Storage Rules. Here I included my rules.
service firebase.storage {
match /b/project-id.appspot.com/o {
match /{allPaths=**} {
allow write: if request.auth != null;
}
}
}
OR allow write:ture;
Method 1. Simply use the Firebase Reference
FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference storageRef = storage.getReferenceFromUrl("gs://your-id.appspot.com");
StorageReference pathReference = storageRef.child("images/cross.png");
Glide.with(context)
.using(new FirebaseImageLoader())
.load(pathReference)
.into(Imageview)
Method 2. Firebase URL
Glide.with(context)
.using(new FirebaseImageLoader())
.load("Firebase_ImageURL")
.into(Imageview)
I had a similar problem. I was trying to delete a file with some wrong case letters
Example: Deleting file_of_user_uidabcde.png
by searching for file_of_user_uIdAbCdE.png
I had the same problem right now and I realized that my image in storage ends with .jpg but my code is asking for the address that ends with .png. After I fixed that, it ran perfectly for me.
hi i faced such problem two days ago. storage exception occurs normally to the projects which you created with google developer console prior to Firebase launch. so when i connected my app to existing project on Firebase it worked. to confirm whether your project accepts storage or not go to Firebase console and on left click storage if you were displayed with the file upload option there the project is capable of storage other wise not.
In my case, I am saving the complete URL in the Firebase database and get it like this: gs: //your-id.appspot.com/images/cross.png
When I do this:
StorageReference ref = FirebaseStorage().Ref().Child(urlImag);
url = (await ref.getDownloadURL()).toString();
I am doing the following:
StorageReference ref = FirebaseStorage (gs://your-id.appspot.com/images/cross.png).ref().child ();
url = (await ref.getDownloadURL()).toString();
This step is not necessary if you already have the full URL saved in your field.