0

I am currently using firebase storage to upload images for a final year project. I am using Angular, Ionic & Capacitor for this project.

I can upload images with no issues (quite proud of it!) but I am unable to retrieve the images when I make a request.

I need the access token for the image in order to display it as part of the url which would look something like: https://firebasestorage.googleapis.com/v0/b/{folder}/o/%2F{photoName}?alt=media&token={accessToken}

I have no idea on how to retrieve the access token from firebase storage. Ideally I would like to set a custom access token so I can upload the image and then store the access token and the image name in the firestore database, then use a call to get the name and token and build the above url.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • 1
    That's not supported - you're not supposed to bulid that URL yourself. You go through the provided API to get a download URL that's already fully formed. https://firebase.google.com/docs/storage/web/download-files#download_data_via_url – Doug Stevenson Mar 30 '22 at 22:09
  • Also asked on https://groups.google.com/g/firebase-talk/c/N4JFfFmGk2E – Frank van Puffelen Mar 31 '22 at 00:15

0 Answers0