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'?
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...