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

101
Vistas
How to read 'Resource Object image from java backend' in javascript, html

A Backend return Resource object.

public ResponseEntity<?> returnImage(String imgFilePath) {

     Resource resource = new FileSystemResource(imagFilePath);

     HttpHeaders header = new HttpHeaders();
     Path path = Paths.get(imageFilePath);
     header.add("Content-Type", Files.probeContentType(path);

     return new ResponseEntity<Resource>(resource, header, HttpStatus.OK);

}

When I fetch image data from backend, response had a string data... Why not response have 'File Object'?

Response console log

I want to read this response and render this file on browser by img tag. I think this string is neither base64 nor dataUrl ... How can i read it and render on browser?

A Postman show image as response body...

postman example

about 4 years ago · Juan Pablo Isaza
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