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

274
Views
La última versión de iOS Chrome no descarga correctamente los blobs (pdf)

Los siguientes ejemplos de código funcionan con:

  • cromo androide
  • Ventanas cromáticas
  • iPhone Safari
  • SafariMac
  • cromo mac

No funciona con:

  • iPhone cromado

Muestra 1

 var oReq = new XMLHttpRequest(); var URLToPDF = fileUrl; oReq.open('GET', URLToPDF, true); oReq.responseType = 'blob'; oReq.onload = function () { const file = new Blob([oReq.response], { type: 'application/pdf' }); const fileURL = URL.createObjectURL(file); window.open(fileURL, '_blank'); };

Muestra 2

 Axios(fileUrl, { method: 'GET', responseType: 'blob', }) .then((response) => { const file = new Blob([response.data], { type: 'application/pdf' }); const fileURL = URL.createObjectURL(file); window.open(fileURL); }) .catch((error) => { console.log(error); });

Muestra 3

 import { saveAs } from 'file-saver'; fetch(fileUrl, { method: 'get', }).then((response) => response.blob()) .then((blobContent) => { var blob = new Blob([blobContent], { type: 'application/pdf' }); saveAs(blob, 'test.pdf'); });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Enfrentando un problema similar con ios/chrome. Como solución probada con la siguiente solución.

 this.blobURL = URL.createObjectURL( new Blob([resp], { type: 'application/pdf;charset=utf-8;' }) ); const k = document.createElement('a'); k.setAttribute('href', this.blobURL); k.setAttribute('target', '_blank'); k.click();
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!