Firebase - How To Attach Image's DownloadUrl To Its Own Metadata?
When we upload an image to the firebase storage, is there a way to attach that image's download url to its own metadata? From my understanding, it seems that you can only get the download url after you have called the:
So effectively, you can't have the downloadUrl until you have uploaded your image. And since your metadata is attached at the time when you upload your image, there doesn't seem to be a way to have your downloadUrl included in your metadata.
Please let me know if there's a way around this.
Why I want to attach downloadUrl to my metadata Just a bit of extra context. I want to have my downloadUrl attached to my image's metadata, so that I will be able to use the cloud function to pass these informations to the firebase database. I want to do it this way instead of uploading the downloadUrl to the firebase storage separately, so that I can ensure that the storage and database are always synced up. We can't have a situation where only the image was uploaded, or only the downloadUrl was uploaded.
You can update the metadata for a storage reference at any time by calling
StorageReference.updateMetadata on it.
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View