Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

520
Vistas
How can I get image download url from firebase storage file, if I know what name it will be stored under?

I have a firebase resize images extension that once the image uploaded to a specific folders(profilePhotos in my case) it converts that image to smaller size(320x320 in my case) and just adds "_320x320" to the end of the name.

Initially, I had a cloud function creating urls and updating the correlating document in firestore via getSignedUrl() until I realised that all signed urls expire after 7 days.

This is how I get the original pictures download url from the front end:

              uploadTask.on(
                "state_changed",
                (snapshot) => {
                  const progress =
                    (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
                  setProgress(progress);
                },
                (error) => {
                  console.log("error" + error);
                },
                () => {
                  getDownloadURL(userUploadRef).then(async (downloadUrl) => {
                    // code that updates the document in firestore by adding the url

If I know that the only difference between the original and resized image name is that one ends with _320x320, can I just alter the download url to get the download url of my image, if so how can it be done?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Changing the download URL would only work if the access token is passed on from the original image to the resized image, which I'm not sure if it is (the Extension supported that at some point, but I recall there were issues with it).

The better approach would be to determine the download URL for the resized image name by a separate call to getDownloadURL with a reference to the correct path:

const storage = getStorage();
const resizedRef = ref(storage, 'images/stars_320x320.jpg');
getDownloadURL(resizedRef).then(...
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda