Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

312
Views
Firebase Storage child ref getDownloadURL que devuelve "childPath.split no es una función"

El error ocurre como resultado de .child(blob), y lo he intentado:

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

"blob" se define en partes anteriores del código, aún debería poder referirse a él en el almacenamiento.

 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 answers
Answer question

0

El método child() toma la ruta del objeto como parámetro y no como un blob. Intente refactorizar el código como se muestra a continuación:

 // 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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!