Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

191
Vistas
Why frontend can't produce PDF file from non-blob response even though it received same data

My NestJS backend returns a pdf file. In local environment it works fine. My React code to handle the file:

const response = await axios.get(`leagues/${leagueId}/matches/${matchId}/reports/${reportType}`, {
  responseType: 'blob',
});

const blob = new Blob([response.data], { type: 'application/pdf' });

I open PDF and it displays properly.

However when I deploy my backend code to AWS Lambda it stops working even though response.data in my frontend app is exactly the same. I even opened both files in VSCode and they are exactly the same but first PDF displays properly and second one is just white blank.

I suspect that it does not return binary-type response. Is there any way to produce PDF blob from a non binary response?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda