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

345
Views
Convertir blob a imagen png en js

Subo una imagen png en mi sitio web (localhost). La mancha es esta -

 size: 81503 type: "image/png" __proto__: Blob arrayBuffer: ƒ arrayBuffer() size: (...) slice: ƒ slice() stream: ƒ stream() text: ƒ text() type: (...) constructor: ƒ Blob() Symbol(Symbol.toStringTag): "Blob" get size: ƒ size() get type: ƒ type() __proto__: Object

Cuando hago URL.createObjectURL(blob) y establezco el nombre de archivo como xyz.jpeg , obtengo el archivo de imagen correcto, que se está cargando en ImageViewer pero el tipo de archivo es incorrecto.

Pero cuando configuro el nombre de archivo como xyz.png , el archivo se está descargando, ImageViewer muestra Fatal error reading PNG image file: Not a PNG file .

¿Porqué es eso? Claramente, el blob tiene file.type png como se muestra arriba. Entonces, ¿por qué la descarga de blob como png arroja un error?

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!