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

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

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 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!