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

165
Views
When uploading an image in firestore database, it is returning a blank. But it is been saved in the firebase, but it is not fetching the img field
uploadTask.on(
    "state_changed",
    (snapshot) => {
      const progress =
        (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
      setProgress(progress);
      switch (snapshot.state) {
        case "paused":
          console.log("Upload is paused");
          break;
        case "running":
          console.log("Upload is running");
          break;
        default:
          break;
      }
    },
    (error) => {
      console.log(error);
    },
    () => {
      getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => {
        setData((prev) => ({
          ...prev,
          img: downloadURL,
        }));
      });
    }
  );

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I believe this is because the download URL is a place to download the image, not a place that is hosting the image. You could try finding the image url instead of the download URL, or you could download the image and reference it from there (possibility delete it after?). For the former, reference the documentation of the library you are using. The latter would probably not be good for performance but it could be an easy way to get things done if you don't need performance.

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!