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

149
Views
Crear objeto de archivo en javascript desde una matriz de bytes

Recibo una matriz de bytes de la API (JAVA y Springboot). Ahora quiero crear un objeto de archivo javascript y pasar ese archivo a FileUploader (carga de archivo angular).

 $scope.reply_query_attachment = new FileUploader({ 'queueLimit': '20', headers: {'Access-Control-Allow-Origin': '*'} }); I tried to add a file to this File uploader queue let file = new File([byteArr], 'test.pdf') let fileItem = new FileItem($scope.reply_query_attachment,file,{}); $scope.reply_query_attachment.queue.push(fileItem); angular.forEach($scope.reply_query_attachment.queue, function (value, index) { value.url = "https://" + $scope.url; value.formData.push({'key': $scope.key + $scope.reply_query_attachment.queue[index].file.name, 'AWSAccessKeyId': $scope.accessKey, 'acl': 'private', 'policy': $scope.policy, 'signature': $scope.signature, 'success_action_status': '201' }); }); $scope.reply_query_attachment.uploadAll();

Pero el archivo cargado siempre está dañado. No pude crear un objeto de archivo javascript válido a partir de la matriz de bytes. ¿Hay alguna forma de agregar la matriz de bytes a la cola del cargador de archivos?

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!