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

116
Vistas
Mapping through all images in firebase storage

I've started to learn firebase, so I need to map and display all images from my storage. I know how to download and display only one image with its' path

const fireBaseApp = initializeApp(firebaseConfig);

function App() {
  const [url, setUrl] = useState();

  useEffect(() => {
    const func = async () => {
      const storage = getStorage(fireBaseApp);
      const download = ref(storage, "logo.png");
      await getDownloadURL(download).then((x) => {
        setUrl(x);
      });
    };
    func();
  }, []);

  return(
    <>
      <img src={url}/>
    </>
  );
}

So can anybody explain me, how to map through all images ? Thank you !

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

0

You can use listAll() function to list all files in a directory or path.

import { getStorage, ref, listAll } from "firebase/storage";

const storage = getStorage();

// Create a reference under which you want to list
const listRef = ref(storage, '/'); // replace path if needed

listAll(listRef)
  .then((res) => {
    res.items.forEach((itemRef) => {
      // All the items under listRef.
      // Can get download URL for each item here
    });
  })
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