firebase-storage

Unable to retrieve image's download URL from Firebase Storage (getting exception) [NEED URGENT HELP]

这一生的挚爱 提交于 2020-07-09 14:55:02
问题 The code successfully uploads an image to Firebase Storage but doesn't give back the download URL. How can I fix this? I get this exception: java.lang.IllegalArgumentException: getDownloadUrl() is not supported at the root of the bucket. Why? private void uploadFile() { if (mImageUri != null) { StorageReference fileReference = mStorageRef.child(System.currentTimeMillis() + "." + getFileExtension(mImageUri)); fileReference.putFile(mImageUri).continueWithTask(new Continuation<UploadTask

How can make folder with Firebase Cloud Functions Storage

自古美人都是妖i 提交于 2020-07-06 09:17:26
问题 how can I make folder "posts" ? bucket --> gs://app.appspot.com/posts code exports.generateThumbnail = functions.storage.object() .onChange(event => { const object = event.data const filePath = object.name const fileName = filePath.split('/').pop() const fileBucket = object.bucket; const bucket = gcs.bucket(fileBucket) const tempFilePath = `/posts/${fileName}` return bucket.file(filePath).download({ destination: tempFilePath }) .then(() => { console.log('image downloaded locally to',

Uploading files from Firebase Cloud Functions to Cloud Storage

妖精的绣舞 提交于 2020-07-05 10:21:14
问题 The documentation is too complex for me to understand. It shows how to download a file from Cloud Storage to Cloud Functions, manipulate the file, and then upload the new file to Cloud Storage. I just want to see the basic, minimum instructions for uploading a file from Cloud Functions to Cloud Storage. Why doesn't this work: const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); exports.storage = functions.firestore.document('Test

Uploading files from Firebase Cloud Functions to Cloud Storage

与世无争的帅哥 提交于 2020-07-05 10:18:12
问题 The documentation is too complex for me to understand. It shows how to download a file from Cloud Storage to Cloud Functions, manipulate the file, and then upload the new file to Cloud Storage. I just want to see the basic, minimum instructions for uploading a file from Cloud Functions to Cloud Storage. Why doesn't this work: const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); exports.storage = functions.firestore.document('Test

Show a modal after images are uploaded with JS and Firebase

牧云@^-^@ 提交于 2020-06-29 07:02:58
问题 How to show a modal after images being uploaded to firebase storage. imgRef1.put(file1).then(function(snapshot) { console.log('Uploaded a blob or file!'); snapshot.ref.getDownloadURL().then(function(downloadURL) { console.log("File available at", downloadURL); imgAns1 = downloadURL; }); }).catch(error => { console.log("Error Occured"); });; I am uploading a file with the above code, and getting the image URL. And then I am assigning it to a imageview src in a modal. document.getElementById(

How to download image from Firebase storage? [closed]

喜欢而已 提交于 2020-06-29 04:40:27
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 months ago . Improve this question I'm trying to download and use image from my Firebase storage using this example: How to download image from firebase database, and load it into image in unity Follow Debug find a problem: UnityEngine.UnityException: SupportsTextureFormatNative can only be called from the main

Firebase Storage - Link not created

一曲冷凌霜 提交于 2020-06-29 04:40:06
问题 I am trying to upload an image and a document to the firebase storage and upload the links created from both to the Real-Time DB, everything happening on a button's click. But in the firebase DB, the links are not uploaded while the other text I upload along with them is there. Storage upload code: updata.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //before uploading both the doc and img.. progressDialog.setTitle("Uploading Images");

Firebase web: upload multiple files to Storage an then download their URLs

混江龙づ霸主 提交于 2020-06-29 04:32:13
问题 I am creating a blogging website, and am writing code that does the following in order: 1. stores multiple photos that the user uploads 2. download their URLs 3. save them to the realtime database. I wrote the function below to do #1 and #2. Basically the idea is to store all the urls to an array, in this case 'urlarray'. function url_array_get(){ return new Promise(function(resolve,reject){ let filez=review_photo.files; let urlarray=[]; let user=firebase.auth().currentUser; let files=Array

Cannot Upload Image to App And Firebase Android Studio

依然范特西╮ 提交于 2020-06-29 04:08:09
问题 please help me, I success to pick an image with a gallery and camera. but image not showing in image view or firebase storage. this is my manifest <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.CAMERA"/> this is my code to show or upload images FirebaseAuth firebaseAuth;

extract URL from function for image resource

不羁的心 提交于 2020-06-29 03:47:11
问题 The following function extracts images stored on a firebase storage and logs their URL to the console. I have tried multiple ways to pass the URL extracted to the Image for display on the screen. All images URL is successfully logged but won't display. EDITED: Added the full code The listFilesAndDirectories function was placed outside the const Gallery declaration, putting function inside Gallery still doesn't change anything. I also tried passing the state to a variable and passing as the