i wanna save my uploaded images in a folder called “course-cover” in firebase storage this is my code that saves uploaded images in the route of storage directly but instead of thet i wanna save them in the “course-cover” folder Answer In addition to the solution that @Dharmaraj covered in their answer, you should also get rid of the problematic
Tag: firebase-storage
return a string from a function in reactjs
I’m trying to return a string from a function this is the function : But it returned undefined, although when I log it to the console it gives the value that I expect. I thought about creating a state, but I can’t because I’m going to call this function several times and I don’t think I can make a state
When accessing files in Firebase Cloud Storage from a client, is it more cost effective to fetch a file using a downloadURL vs getBlob?
In my web application which uses Firebase v9: Specific to downloading files from a firebase cloud storage bucket client side, I am concerned about cost and quotas. Which method is the most cost effective? use getBlob() to download a file. use getDownloadURL() to obtain a download url, store it in the DB and subsequently fetch the file. Looking at the
How to remove images from Firebase Storage?
I’m trying to adapt a React Native project to the new Firebase methods. In it I upload images to Storage and they are added to the App interface. I can also remove these images from the interface as shown in the following code: The problem is that in this way, they are only removed from my App, while the images
Firebase Storage – Web v9 – how to check if file exists in bucket?
Currently I’m using getDownloadURL() and error handling like this which works, but kind of feels like a workaround. So I’m wondering if this is the way to go or if there’s a better alternative. Maybe I’m missing a build in way to directly request the existence? (with ‘Web v9’ options) Answer There isn’t any direct way like exists() to check
Firebase Storage Web: uploadTask.cancel() is not working reactjs
I want to cancel the upload task at the click of a button. But it is not working(it returns false and I can view the file in the firebase storage console) below is the full code of the component Upload.js Here is what’s happening in the console after I click on cancel(after clicking upload and setting a file(img, 3.15mb)) if
Firebase Storage in Web Application: storage.useEmulator is not a function
In my local web application development environment the web application is accessing the Firestore emulator correctly, but not the Storage emulator. Instead it accesses the production storage. I load the module from http://localhost:5000/__/firebase/8.3.0/firebase-storage.js I have tried this from https://firebase.google.com/docs/emulator-suite/connect_storage#web-v8: But the useEmulator function does not exist. How can this be? Answer The function storage.useEmulator was introduced in a later version
Firestorage has different behavior when hardcode
I don’t know what happened with my code. But everytime i used this code is working But when i switched to urlPathThumbs it will become error 404. Error said like so Firebase Storage: Object ‘courses/m9APF8TEUnfS6IQew591sl4kphH2/thumbs/Rectangle 68 (1)_200x200.png’ does not exist. (storage/object-not-found) however they both are same pattern. This is how variable urlPathThumbs created in previous snippet code this file is
Firebase Storage – Upload Image with React Native, Error loading Preview
This is the code which I use to upload images to firebase storage But when I check the firebase console it shows, error loading preview, and the file size is 9B for a image. Is there something Im missing. Im using Expo managed, expo-image-picker to select images. Answer I found a way, I had to create a blob and then
How do I display all of the images from my Firebase Storage in React Native without needing image names?
Hello i am trying to figure out how to display all of the images in a folder i have in Firebase Storage called “VerifiedPhotos”. I don’t want to reference them by image name like I did below because I have multiple images. How do I grab all the list of image URLS and display them to my screen in React