firebase-storage

Firebase retrieve image from URL save with Firebase database

北城余情 提交于 2020-01-13 07:02:06
问题 I have saved an image to the Firebase storage and also saved the imageURL to Firebase database, but how can I get the image back by the URL saved in firebase database? Here is how I save it func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) { userPhoto.image = image dismissViewControllerAnimated(true, completion: nil) var data = NSData() data = UIImageJPEGRepresentation(userPhoto.image!, 0.8)! // set upload

How to enable and use file versioning in Firebase Storage?

被刻印的时光 ゝ 提交于 2020-01-13 05:49:14
问题 Firebase storage is based on Google Cloud Platform which allows versioning of files. In the Firebase console there are no options regarding the GCP bucket, and when accessing the GCP console, there doesn't seem to be a way on enabling versioning in the bucket pertaining to the Firebase project. Also, the Firebase SDK does not mention how to access previous versions of files even if versioning was enabled. Is versioning possible with Firebase Storage? 回答1: Firebase Storage is built on GCS so

how to check if file exists in Firebase Storage?

我的梦境 提交于 2020-01-12 11:46:42
问题 When using the database you can do snapshot.exists() to check if certain data exists. According to the docs there isn't a similar method with storage. https://firebase.google.com/docs/reference/js/firebase.storage.Reference What is the proper way of checking if a certain file exists in Firebase Storage? 回答1: I believe that the FB storage API is setup in a way that the user only request a file that exists. Thus a non-existing file will have to be handled as an error: https://firebase.google

how to check if file exists in Firebase Storage?

烂漫一生 提交于 2020-01-12 11:46:17
问题 When using the database you can do snapshot.exists() to check if certain data exists. According to the docs there isn't a similar method with storage. https://firebase.google.com/docs/reference/js/firebase.storage.Reference What is the proper way of checking if a certain file exists in Firebase Storage? 回答1: I believe that the FB storage API is setup in a way that the user only request a file that exists. Thus a non-existing file will have to be handled as an error: https://firebase.google

how to check if file exists in Firebase Storage?

坚强是说给别人听的谎言 提交于 2020-01-12 11:45:15
问题 When using the database you can do snapshot.exists() to check if certain data exists. According to the docs there isn't a similar method with storage. https://firebase.google.com/docs/reference/js/firebase.storage.Reference What is the proper way of checking if a certain file exists in Firebase Storage? 回答1: I believe that the FB storage API is setup in a way that the user only request a file that exists. Thus a non-existing file will have to be handled as an error: https://firebase.google

Firebase how to get Image Url from firebase storage?

丶灬走出姿态 提交于 2020-01-11 18:49:04
问题 Right now i am fetching image from Storage of Firebase by using below code : mStoreRef.child("photos/" + model.getBase64Image()) .getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() { @Override public void onSuccess(Uri uri) { // Got the download URL for 'photos/profile.png' } }).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { // Handle any errors Toast.makeTextthis, "image not dowloaded", Toast.LENGTH_SHORT).show()

How to download and view images from the new Firebase Storage?

空扰寡人 提交于 2020-01-11 09:48:08
问题 I am able to upload images to Firebase Storage but I am having trouble downloading them. This is my code to download images: let storage = FIRStorage.storage() let localURL : NSURL! = NSURL(string: "file:///Documents/co.png") // i also tried let localURL : NSURL! = NSURL.fileURLWithPath("file:///Documents/co.png") func download() { let storageRef = storage.referenceForURL("gs://project-5547819591027666607.appspot.com") let imageRef = storageRef.child("co.png") let downloadTask = imageRef

Image loading and uploading to Firebase Storage not working in android and firebase console showing “error loading preview”

我的梦境 提交于 2020-01-11 06:15:11
问题 Firebase Storage show "error loading preview" in the firebase console Initially during uploading and loading it worked fine in my app. After Two days when I am checking if my app is working fine or not the error occurs: Screen Shot of the error here. My image uploading code: if(imagePath!=null) { FirebaseStorage.getInstance().getReference("admin").child(admin.getId()).putFile(imagePath); } My image Loading code: FirebaseStorage.getInstance().getReference("admin").child(image_path)

How to resize images uploaded to Cloud Storage to a specified size?

淺唱寂寞╮ 提交于 2020-01-11 04:15:32
问题 I am using RecyclerView in my application for the professor to see the students list where there will be photos and other details and delete options. Everything I tried to do carefully. But there is a problem that photo from firebase is not loading into the RecyclerView . Sometimes it loads one or two photos then it stops loading photo. I was observing the Run option on android Studio while my app is loading. Then I found something like... W/art: Throwing OutOfMemoryError "Failed to allocate

Firebase get Download URL after successful image upload to firebase storage

江枫思渺然 提交于 2020-01-11 00:08:09
问题 I am trying to upload a single image to Firebase Storage, then grab its download url and assign this to a variable. I can upload my image to firebase successfully, however I cannot retrieve the download url. here is what I have tried already. upload() { let storageRef = firebase.storage().ref(); let success = false; for (let selectedFile of [(<HTMLInputElement>document.getElementById('file')).files[0]]) { let router = this.router; let af = this.af; let folder = this.folder; let path = `/$