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

127
Views
Why uploaded image blob to AWS is black?

I thought it will work, first by extracting image:

   const [b, setB] = useState<any>()

   const draw = (ctx) => {
       // some code here
   }

   const canvas = canvasRef.current
   if (canvas && !isUploaded) {
       const context = canvas?.getContext('2d')
       draw(context)
       canvas.toBlob(
           (b2) => {
               console.log(b2)
               setB(b2)
           },
           'image/jpeg',
           0.95
       )
   }

   
   useEffect(() => {
       // get presign URL

   return axios({
       method: 'put',
       url: res.data,
       data: b,
       withCredentials: false,
       headers: { 'x-amz-acl': 'public-read' },
   })

// ..

       setIsUploaded(true)
   }, [isReadToUpload])

then send it as it is a "file". But only a big 'black' image is sent, why?

about 4 years ago · Juan Pablo Isaza
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!