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

319
Vistas
Firebase Storage child ref getDownloadURL returning "childPath.split is not a function"

The error occurs as a result of the .child(blob), and I've tried:

.child()
.child({blob})
.child(blob.name)

"blob" is defined in earlier parts of the code, it should still be able to refer to it in the storage.

        async function handleSubmitUpload() {
        if (recordedChunks.length) {
            const blob = new Blob(recordedChunks, {
                type: "video/webm",
            });
            await storage().ref(`prodReviews/${blob}`).put(blob);
            console.log( "success storing" + (blob));
            await storage()
                .ref('prodReviews')
                .child(blob)
                .getDownloadURL()
                .then((videoUrl) => {
                    firestore.doc(`products/${productID}`)
                    .set({videoUrl}, { merge: true });
                    console.log("Review for item uploaded successfully")

                        setRecordedChunks([]);
                    })

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

0

The child() method takes the path of the object as parameter and not a blob. Try refactoring the code as shown below:

// Create a storage reference
const reviewRef = storage().ref(`prodReviews/${blob}`);

// Upload the object to that ref
await reviewRef.put(blob);

// Get download URL
const videoUrl = await reviewRef.getDownloadURL();

// Add Firestore document
await firestore.doc(`products/${productID}`).set({videoUrl}, { merge: true });
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