Questions tagged [firebase-storage]
Cloud Storage for Firebase (previously called Firebase Storage) gives developers robust, secure uploads and downloads from Firebase SDKs by handling network interrupts and providing an intuitive authorization model. Firebase Storage is backed by Google Cloud Storage, which allows you to scale from prototype to production.
                                	
	firebase-storage
    
                            
                        
                    
            7,239
            questions
        
        
            294
            votes
        
        
            6
            answers
        
        
            256k
            views
        
    Firebase Storage How to store and Retrieve images [closed]
                How to store and view images on firebase?
            
        
       
    
            203
            votes
        
        
            27
            answers
        
        
            144k
            views
        
    Get Download URL from file uploaded with Cloud Functions for Firebase
                After uploading a file in Firebase Storage with Functions for Firebase, I'd like to get the download url of the file.
I have this :
...
return bucket
    .upload(fromFilePath, {destination: ...
            
        
       
    
            196
            votes
        
        
            5
            answers
        
        
            139k
            views
        
    Firebase Storage and Access-Control-Allow-Origin
                I'm trying to download files from Firebase Storage through a XMLHttpRequest, but Access-Control-Allow-Origin is not set on the resource, so it's not possible. Is there any way to set this header on ...
            
        
       
    
            131
            votes
        
        
            11
            answers
        
        
            21k
            views
        
    Firebase storage artifacts
                I' trying to understand what eu.artifacts.%PROJECT NAME%.appspot.com is. It's currently taking up 800mb of storage from my daily 5gb limit. It contains only application/octet-stream type of files. ...
            
        
       
    
            130
            votes
        
        
            20
            answers
        
        
            155k
            views
        
    How to get a list of all files in Cloud Storage in a Firebase app?
                I'm working on uploading images, everything works great, but I have 100 pictures and I would like to show all of them in my View, as I get the complete list of the images in a folder, I can not find ...
            
        
       
    
            92
            votes
        
        
            9
            answers
        
        
            92k
            views
        
    Firebase Storage Video Streaming
                I'm working on an app that has video streaming functionality. I'm using firebase database and firebase storage. I'm trying to find some documentation on how firebase storage handles video files, but ...
            
        
       
    
            82
            votes
        
        
            17
            answers
        
        
            99k
            views
        
    TypeError: firebase.storage is not a function
                Following this example, I keep getting the error:
 TypeError: firebase.storage is not a function
From this line in my code:
var storageRef = firebase.storage().ref();
(And when I simply try to ...
            
        
       
    
            74
            votes
        
        
            14
            answers
        
        
            124k
            views
        
    User does not have permission to access this object . Firebase storage android
                I am new to firebase storage. Just so I could learn it, I made a simple app that has a button and an ImageView. When I click on the button, an image (from drawable) gets displayed on the ImageView. I ...
            
        
       
    
            55
            votes
        
        
            5
            answers
        
        
            136k
            views
        
    How to get a File() or Blob() from an URL in javascript?
                I try to upload an image to the Firebase storage from an URL (with ref().put(file))(www.example.com/img.jpg). 
To do so i need a File or Blob, but whenever I try new File(url) it says "not enough ...
            
        
       
    
            54
            votes
        
        
            5
            answers
        
        
            56k
            views
        
    how do I check the file size of a video in flutter before uploading
                I want to upload a video file to my cloud storage but I want to check the size of the video file before I upload. how to achieve this
            
        
       
    
            54
            votes
        
        
            6
            answers
        
        
            37k
            views
        
    how to check if file exists in Firebase Storage?
                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/...
            
        
       
    
            52
            votes
        
        
            5
            answers
        
        
            28k
            views
        
    Store files with unique/random names
                With the new Firebase API you can upload files into cloud storage from client code. The examples assume the file name is known or static during upload:
// Create a root reference
var storageRef = ...
            
        
       
    
            52
            votes
        
        
            7
            answers
        
        
            69k
            views
        
    Upload files to Firebase Storage using Node.js
                I'm trying to understand how to upload files in Firebase Storage, using Node.js. My first try was to use the Firebase library:
"use strict";
var firebase = require('firebase');
var config =...
            
        
       
    
            51
            votes
        
        
            4
            answers
        
        
            17k
            views
        
    Android - Firebase - TaskSnapshot - Method should only be accessed within private scope?
                Everything was working great... until I came back to work from a 3 month break and updated my Firebase from 9.8 to 10.0.1
Now all of my calls to TaskSnapshot are giving me an error.
Here is the ...
            
        
       
    
            50
            votes
        
        
            15
            answers
        
        
            40k
            views
        
    FirebaseStorage: How to Delete Directory
                FirebaseStorage always returns error 400 when I try to delete a directory i.e. something like the following always returns error 400.
let storageRef = FIRStorage.storage().reference().child("path/to/...
            
        
       
    
            49
            votes
        
        
            2
            answers
        
        
            29k
            views
        
    How to change region of existing Firebase project?
                I have a project that is located in the Central America region, but since I can choose a European region, I would like to change the location of the firestore and storage. Is it possible to do this ...
            
        
       
    
            48
            votes
        
        
            13
            answers
        
        
            65k
            views
        
    Flutter & Firebase: Compression before upload image
                I want to send photo selected by user in my app to Firebase Storage. I have a simple class with property _imageFile which is set like this:
File _imageFile;
_getImage() async {
    var fileName = ...
            
        
       
    
            46
            votes
        
        
            8
            answers
        
        
            40k
            views
        
    How to download entire folder from Firebase Storage?
                I want to download an entire folder from Firebase storage. I can download single files using DownloadURL as follows, but it does not work for folders.
var storageRef = firebase.storage().ref();
// ...
            
        
       
    
            43
            votes
        
        
            15
            answers
        
        
            125k
            views
        
    How to get URL from Firebase Storage getDownloadURL
                I'm trying to get the "long term persistent download link" to files in our Firebase storage bucket.
I've changed the permissions of this to
service firebase.storage {
  match /b/project-xxx.appspot....
            
        
       
    
            43
            votes
        
        
            3
            answers
        
        
            8k
            views
        
    Can Firebase Cloud Storage rules validate against Firestore data?
                Can we use Firestore data to grant or restrict access to files hosted on Firebase Cloud Storage?
Exemple of what I would like to use as Firebase Security Rule
allow write: if get(/databases/mydbname/...
            
        
       
    
            41
            votes
        
        
            2
            answers
        
        
            20k
            views
        
    Firebase : Differences between realtime database and file storage
                I learnt about real-time data storage and hosting storage from this post Difference between Data Storage and Hosting Storage?
But i am still not clear about real time Database and and newly ...
            
        
       
    
            38
            votes
        
        
            3
            answers
        
        
            6k
            views
        
    Firebase storage artifacts is huge and keeps increasing
                I've just noticed that my app's storage started to increase significantly.
After having a closer look, it appeared that this was caused by the "artifacts" bucket.
I can see that the "...
            
        
       
    
            38
            votes
        
        
            6
            answers
        
        
            23k
            views
        
    Set cache to files in Firebase Storage
                I have a PWA running on Firebase. My image files are hosted on the Firebase Storage. I've noticed my browser doesn't save cache for files loaded from the storage system. The browser requests the files ...
            
        
       
    
            37
            votes
        
        
            4
            answers
        
        
            39k
            views
        
    Why my nextjs component is rendering twice?
                This is a component that render data from firebase storage and make it listed. What the function has to do is set the videos extracted from firebase storage to the useState. That way I can call videos ...
            
        
       
    
            37
            votes
        
        
            7
            answers
        
        
            48k
            views
        
    Getting 403 Forbidden error when trying to load image from Firebase Storage
                I'm using firebase storage to store and load images for users on my android app. All users must be authenticated before using it. Occasionally, some user profile images are not showing and throwing "...
            
        
       
    
            37
            votes
        
        
            6
            answers
        
        
            39k
            views
        
    How to create a folder in Firebase Storage?
                So the new Firebase has support for storage using Google Cloud Platform.
You can upload a file to the images folder using:
var uploadTask = storageRef.child('images').put(file, metadata);
What if ...
            
        
       
    
            35
            votes
        
        
            2
            answers
        
        
            10k
            views
        
    SigningError with Firebase getSignedUrl()
                I'm trying to use file.getSignedUrl() to get the download URL from Firebase Storage via Google Cloud Functions (Nodejs). I'm getting this error in the Cloud Functions console:
{ SigningError: A ...
            
        
       
    
            35
            votes
        
        
            1
            answer
        
        
            11k
            views
        
    Firebase Storage getDownloadUrl's token validity
                I have a question regarding the "token" in the url(&token=) when using getDownloadUrl of FirebaseStorage.
https://firebasestorage.googleapis.com/v0/b/someapplication.appspot.com/o/images%2Fsample....
            
        
       
    
            34
            votes
        
        
            9
            answers
        
        
            32k
            views
        
    How to Store "direct link" to an image using Firebase Storage
                I need to access an image stored on Firebase Storage by a direct link, eg
http://myfirebasehost.com/storage/imgIwant.png
For all I know, it can only this type of URL using the protocol gs://, ...
            
        
       
    
            34
            votes
        
        
            12
            answers
        
        
            151k
            views
        
    In Firebase after uploading Image how can I get Url? [duplicate]
                Right now, I'm fetching image from storage of Firebase by using below code:
mStoreRef.child("photos/" + model.getBase64Image())
          .getDownloadUrl().addOnSuccessListener(new ...
            
        
       
    
            33
            votes
        
        
            1
            answer
        
        
            24k
            views
        
    Can I use Firebase Storage for online music streaming?
                What I want is to save mp3 files on Firebase Storage and then stream it to an Android device. All the tutorials on Firebase discuss about the image file upload and download.
If there are any other ...
            
        
       
    
            32
            votes
        
        
            10
            answers
        
        
            48k
            views
        
    How to upload multiple files to Firebase?
                Is there a way to upload multiple files to Firebase storage. It can upload single file within single attempt as follows. 
fileButton.addEventListener('change', function(e){ 
//Get file
var file = e....
            
        
       
    
            31
            votes
        
        
            4
            answers
        
        
            1k
            views
        
    Get Download Url after firebase's resize extension completed
                This is what I am trying to achieve, implement the firebase's resize image extension, upload an image, then when the resize is completed, add that dowloadUrl's thumbs to a Cloud Firestore document. ...
            
        
       
    
            30
            votes
        
        
            11
            answers
        
        
            23k
            views
        
    How to delete a Firebase Storage file with flutter?
                I'm new to both Flutter and Firebase, so bear with me on this one.
I am trying to delete a File in my Firebase Storage using the file Url.
I have the full Url of the file and remove all characters ...
            
        
       
    
            29
            votes
        
        
            3
            answers
        
        
            11k
            views
        
    Firebase Storage very slow compared to Firebase Hosting
                Anyone know why firebase storage would be so ridiculously slow compared to firebase hosting? 
Results
Time to download image of firebase hosting: 16ms
Time to download same image from firebase ...
            
        
       
    
            28
            votes
        
        
            6
            answers
        
        
            18k
            views
        
    How to move files with firebase storage?
                Is there a way to move files with firebase.storage()?
Example:
user1/public/image.jpg to user1/private/image.jpg
            
        
       
    
            28
            votes
        
        
            1
            answer
        
        
            73k
            views
        
    firebase storage - getting image URL [duplicate]
                I have started to use firebase (Firebase for web) for my backend. I can handle Firebase Realtime Database quite well, but I do not clearly understand how Firebase Storage (for images, videos etc.) ...
            
        
       
    
            26
            votes
        
        
            11
            answers
        
        
            47k
            views
        
    Flutter - Upload Image to Firebase Storage
                I get an image from Firebase Storage, take a photo with the camera, or pick one from the Library. When one of these is complete, I have a class which stores an Image so that I can use it when required....
            
        
       
    
            26
            votes
        
        
            4
            answers
        
        
            69k
            views
        
    Firebase storage Quota has been exceeded
                I have set up a test account on firebase just for development purposes.
I made use of the storage feature and so I uploaded manually an image with the size of 400kb which later I downloaded through ...
            
        
       
    
            26
            votes
        
        
            1
            answer
        
        
            7k
            views
        
    Upload base64 encoded jpeg to Firebase Storage (Admin SDK)
                I am trying to send a picture from my mobile hybrid app (Ionic 3) to my Heroku backend (Node.js) and have the backend upload the picture to Firebase Storage and return the newly uploaded fil download ...
            
        
       
    
            25
            votes
        
        
            18
            answers
        
        
            46k
            views
        
    Get Download URL from Firebase Storage in Flutter
                I'm currently exploring Flutter, I found there is an official Firebase Storage plugin in Flutter firebase_storage
I have storage reference like this one:
final StorageReference ref = FirebaseStorage....
            
        
       
    
            25
            votes
        
        
            13
            answers
        
        
            41k
            views
        
    How to get file URL after uploading them to Firebase?
                Once you have uploaded a file to Firebase how can you get it's URL so that you can store that for later use? I want to write the URL to a Firebase Database so that other users can access the image.
I ...
            
        
       
    
            25
            votes
        
        
            1
            answer
        
        
            44k
            views
        
    Firebase User Uploads and Profile Pictures
                Hello looking for some help, 
I currently have some JavaScript code that allows a signed in user to upload an image to Firebase storage. I want the image that they upload to be their profile picture, ...
            
        
       
    
            24
            votes
        
        
            6
            answers
        
        
            41k
            views
        
    Firebase Token Authentication error
                I am using firebase storage to upload files , but when I upload I am getting this error
E/StorageUtil: error getting token java.util.concurrent.ExecutionException: com.google.android.gms.internal....
            
        
       
    
            24
            votes
        
        
            1
            answer
        
        
            12k
            views
        
    What is the difference between Firebase Storage and Cloud Firestore/Realtime Database?
                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: ...
            
        
       
    
            23
            votes
        
        
            6
            answers
        
        
            87k
            views
        
    How to send FCM notification to app from web
                I am developing chat app which is based on Firebase Database and Storage. Everything is working fine, but now I need implementation of FCM to receive notification on app when app is in background or ...
            
        
       
    
            23
            votes
        
        
            2
            answers
        
        
            31k
            views
        
    Where do I find "bucket" details for Firebase setup?
                For configuring my firebase connection I need to include bucket details.
storageBucket: "<BUCKET>.appspot.com",
Where do I find this?
            
        
       
    
            23
            votes
        
        
            5
            answers
        
        
            12k
            views
        
    Value of type 'StorageMetadata' has no member 'downloadURL'
                Hey I need help with this coding, i'm not sure what has happened. It was working the other day. The error comes up after if let ur; = metaData?.downladURL()
func uploadProfileImage(_ image:UIImage, ...
            
        
       
    
            23
            votes
        
        
            2
            answers
        
        
            15k
            views
        
    Firebase - uploading images when internet is offline
                Firebase has great option of using their database and sending data to their db even if you are offline, and then when the connection is up again, it sends automatically the data to the db.
is it also ...
            
        
       
    
            23
            votes
        
        
            2
            answers
        
        
            3k
            views
        
    will Cloud Function affect Firebase Storage bandwidth usage?
                I am trying to figure out why firebase storage usage is far above my expectation
I only have few photo files in my Firebase storage, just around 75 photos, 100kb for each photo. but my bytes stored ...