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

430
Views
FileReader: DOMException, no se puede convertir blob a cadena base64

Estoy usando FileReader para convertir un Blob (creado a partir de un archivo que tiene más de 2 GB) en una cadena base64. Pero lamentablemente estoy terminando con el siguiente error:

 DOMException: The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired

Funciona bien si el archivo tiene menos de 2 GB.

Convertidor:

 private convertBlobToBase64 = (blob: Blob, filename: string) => new Promise<FileForSaveInDevice>((resolve, reject) => { console.log('Blob', blob); const reader = new FileReader(); reader.onerror = reject; reader.onload = () => { resolve({ base64: reader.result as string, filename }); }; reader.readAsDataURL(blob); });

Encontré una pregunta similar, que no obtuvo respuesta: FileReader: DOMException, no se puede convertir blob en arrayBuffer una y otra vez

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

¿Por qué tienes que hacer eso? Te sugiero que dividas el archivo en trozos

 blobInChunks(blob:Blob) { let chunkSize = 1024 * 1024 * 64; //64Mb let chunks = Math.ceil(blob.size/chunkSize) ; let chunk = 0 ; let _chunksArray:Blob[] = [] ; while (chunk++ <= chunks) { let offset = chunk*chunkSize ; _chunksArray.push(blob.slice(offset, offset + chunkSize)) ; } return _chunksArray ; }
about 4 years ago · Santiago Trujillo 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!