firebase-storage

How to set image view from Firebase storage?

拈花ヽ惹草 提交于 2021-01-28 10:31:43
问题 I tried all examples both from the docs and from online help, but I can't get a simple image I have in the storage to display on an image view. assuming I have pictures in the storage in a folder called pictures so photo1.jpg is stored in the reference: StorageReference storageReference = FirebaseStorage.getInstance().getReference(); StorageReference photoReference= storageReference.child("pictures/photo1.jpg"); But how do I set it and replace the contents with an existing image view that I

How can i change Firebase storage image file name which is already uploaded?

允我心安 提交于 2021-01-28 06:47:54
问题 I need to change the file name which is already uploaded in firebase storage. Because, after uploading a image in firebase storage, i save the url in firebase database under a specific child(folder). But when i move the image to another child(folder), i need to change the image file name in storage according to new name. How can i do this? Firebase metadata has a name property, but it is readonly property. 回答1: You cannot change the filename of the image that is already uploaded to firebase

Firebase error when trying to get a file download url from firebase

。_饼干妹妹 提交于 2021-01-28 06:01:16
问题 I'm trying to upload an image file and get the image download URL using this code private void UploadImage() { String storageFileName = System.currentTimeMillis() + ".jpg"; // Time is used to ensure unique file name FireBase_File = FireBase_Storage.child(storageFileName); FireBase_File.putFile(UriBitmap).addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() { @Override public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) { if(task.isSuccessful()) { FireBase

How can i create bucket on Firebase Cloud Storage

邮差的信 提交于 2021-01-28 05:55:21
问题 I'm a python developer.we use GCS (Google cloud storage) to store our images for past we months which is good but for android it requires to import all the buckets to Firebase Cloud Storage(FCS) for accessing it. We dont want any manual integration. we heard that if we create a bucket on FCS which automatically reflect on GCS which is good and there is no import required. We trying to create bucket directly on firebase cloud storage. may i know is that posstible by programmtically? 回答1: You

How to get all files inside a Firebase Storage directory using Flutter

落爺英雄遲暮 提交于 2021-01-28 05:05:27
问题 I have an App that display nightclub description and image. Each club have about 4 related image. In Firebase Storage i have created directory for each club and then stored their image inside. so what i want to do is getting all the image from a club directory so i can display all the image in my app i think a way of achieving this would be to get the DownloadUrl of each image. i've tried this : final StorageReference firebaseStorageRef = FirebaseStorage.instance.ref() .child('profilePics/

How to upload image to firebase storage and save reference in the database in single transaction?

两盒软妹~` 提交于 2021-01-27 23:46:19
问题 I would like to upload image to firebase storage and save link to it in the firebase database. Saving link to database can fail for whatever reason and then I have unused, unlinked image in the storage. Is it possible to somehow ensure that after upload link to the image is saved in the database? 回答1: This is another approach other than using transaction. You can use Firebase Cloud Functions Storage Trigger. You can write a cloud function to get the download URL of the uploaded image and then

error 400 when accessing firebase storage trying to get file url

北战南征 提交于 2021-01-27 04:57:28
问题 I'm trying the ionic and firebase platforms and i ran into a problem. so i have an image in the storage I'm trying to access, i tried using the getDownloadURL() method but i keep getting an error 400, "invalid http method/url pair". i can't find any solution to it. same error when trying to use getMetadata(). firebase is initialized and all is working well for now, authentication, database readings and all. except for this error... i have the following code in a service.. // Get a reference

Upload a file to Firebase Storage and get a downloadUrl. How can I return the result in a Kotlin function?

大憨熊 提交于 2021-01-21 05:38:45
问题 I have a function that uploads a local file to Firestore Storage using uploadTask . I followed the instructions given in the docs. Here is my code: fun uploadAudioFile(file: File){ val audioFilePathUri = Uri.fromFile(file) val ref = currentUserRef.child("audioFiles/" + System.currentTimeMillis() + "." + "m4a") val uploadTask = ref.putFile(audioFilePathUri) val urlTask = uploadTask.continueWithTask(Continuation<UploadTask.TaskSnapshot, Task<Uri>> { task -> if (!task.isSuccessful) { task

What is the difference between Firebase Storage and Cloud Firestore/Realtime Database?

余生长醉 提交于 2021-01-20 11:55:38
问题 I have been using Google Firebase's Realtime Database, but want to be able to store more complex user-generated data like images, videos etc. As per the Firebase docs, they provide two other services: 'Firebase Storage' and 'Cloud Firestore'. Can someone please summarise what the difference is between the similarly named 'Storage' and 'Firestore'. 回答1: The products are not really comparable. They have almost nothing in common, except from the perspective of Firebase client, apps which are

Firebase Storage - Image preview is permenantly loading

半世苍凉 提交于 2021-01-20 08:47:14
问题 I've started working with firebase storage and firebase functions recently. Right now I've been developing file upload from functions to storage . I've got it working (upload is done and file appears on the storage section), yet, the image, stays like this forever (loading forever on the right side): I though that it was an error from my code. Yet, if I open Google Cloud Platform - Storage, the image appears and I can open it and preview it. In firebase storage, if I open the image (select on