Next.js Discord

Discord Forum

Firebase + next JS how to fetch img url from firebase storage

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Avatar
Sun bearOP
so basically im able to now send the uploaded imgs to firebase storage => and each of the img name have the same corresponding id of the customer. what im trying to do is basically i have a dynamic route setup which shows more data about the customer so in there i want to be able to show the img uploaded so what i see weird is im able to get the public url in the console when using getDownloadUrl(firebase function) however when i try to store that url in state to use to as the src of the img it just returns undefiend even tough im awaiting on it
this is the dynamic route page.tsx btw just basically getting the customer.id and then using that as the way to get the img reference which i can then pull out the url from firebase
Image

0 Replies