firebase-storage

Firebase Storage - Image preview is permenantly loading

删除回忆录丶 提交于 2021-01-20 08:46:33
问题 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

Firebase Storage - Image preview is permenantly loading

随声附和 提交于 2021-01-20 08:46:25
问题 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

How to save the Image to Firebase storage and save the URL to firebase firestore?

柔情痞子 提交于 2021-01-07 01:17:11
问题 Hi I am trying to save an image which is picked from gallery or camera. Future<void> getImage({ImageSource source}) async { _pickedImage = await ImagePicker().getImage(source: source); if (_pickedImage != null) { _pickedImageFile = File(_pickedImage.path); } } After picking the image it has to update image to the firebase storage. void _uploadImage(File image) async { Reference storageReference = FirebaseStorage.instance .ref() .child('UserImage') .child("UserImage/${user.uid}"); UploadTask

How to save the Image to Firebase storage and save the URL to firebase firestore?

梦想与她 提交于 2021-01-07 01:07:48
问题 Hi I am trying to save an image which is picked from gallery or camera. Future<void> getImage({ImageSource source}) async { _pickedImage = await ImagePicker().getImage(source: source); if (_pickedImage != null) { _pickedImageFile = File(_pickedImage.path); } } After picking the image it has to update image to the firebase storage. void _uploadImage(File image) async { Reference storageReference = FirebaseStorage.instance .ref() .child('UserImage') .child("UserImage/${user.uid}"); UploadTask

how to upload image Url Uploaded to Fire Storage and Save it in fireStore at the Same time Using Java

强颜欢笑 提交于 2021-01-06 03:29:42
问题 Here's my code where i can retrieve the image Url in Toast message where it is unable to save it in firestore please tell me if there is another method to do it or is the problem where i store the URL: public class register extends AppCompatActivity { EditText emails; EditText passwords; EditText ages; Button registers; Button addImage; EditText country; FirebaseFirestore db; FirebaseAuth auth; FirebaseUser auth1; private StorageTask task; Uri url ; Uri imageUri; static final int IMAGE

how to upload image Url Uploaded to Fire Storage and Save it in fireStore at the Same time Using Java

别说谁变了你拦得住时间么 提交于 2021-01-06 03:28:20
问题 Here's my code where i can retrieve the image Url in Toast message where it is unable to save it in firestore please tell me if there is another method to do it or is the problem where i store the URL: public class register extends AppCompatActivity { EditText emails; EditText passwords; EditText ages; Button registers; Button addImage; EditText country; FirebaseFirestore db; FirebaseAuth auth; FirebaseUser auth1; private StorageTask task; Uri url ; Uri imageUri; static final int IMAGE

Firebase Image Resize Extension. Referencing the resized images

◇◆丶佛笑我妖孽 提交于 2021-01-04 09:22:51
问题 first time jumping into the Firebase extensions and felt Image Resizer was a good one to use for my needs. However, the documentation on using it is a little thing and leaving me a bit stuck. Currently, I upload the image, it auto generates the new dimension and saves them to my desired path. However, I am unable to figure out how to call the now resized image. I am currently storing the uploaded image with a path like so; var storageRef = firebase.storage().ref("Project_Image/" + this

how to resolve java.lang.IllegalStateException: Task is not yet complete Error when uploading image to Firebase storage?

天大地大妈咪最大 提交于 2020-12-30 08:33:33
问题 I started to have this error after I updated firebase storage to the latest version 16.0.1. I didn't change anything in my code i just got this error after upgrading gradle build dependencies AskFirebase uploadTask.addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() { @Override public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) { if (task.isSuccessful()) { Uri downloadUri = task.getResult().getStorage().getDownloadUrl().getResult(); if (downloadUri == null

Get uid in firebase function onFinalize for firebase storage

人盡茶涼 提交于 2020-12-27 06:28:39
问题 I use the firebase JS sdk to upload audio files to firebase-storage. When this happens I need to process it based on the authenticated user doing the uploading (I upload it somewhere else for processing). This means I need to have access to the uid after it has been validated by storage rules, to keep it safe. While researching this I found workarounds such as using the metadata to send the user's ID token but in my opinion this is a bad idea as it's possible to abuse. I found this question

Dynamic progress bar for Firebase Storage Upload

自古美人都是妖i 提交于 2020-12-26 12:43:05
问题 My problem is that I can't get firebase.storage.UploadTaskSnapshot.bytesTransferred directly from firebasePutString , but need to use the .on("state_changed") method, but this method is called only every few seconds (every 256Kb), so the progress bar isn't really dynamic. I can't figure out how to call it directly from my firebasePutString object. Any ideas?? let firebasePutString = firebase.storage().ref(`/${UID}/${fileName}`).putString(data, 'data_url'); firebasePutString.on('state_changed'