I need to send multiple files to UI from db, I saw couple of post like this and here, it suggest that I need to zip multiple files and send to client, but my client is front end angular code which unable to handle zip file. I
tried code like below
public ResponseEntity<List<ByteArrayResouse>> downloaFile(){
List<ByteArrayResource> listOfFiles = fileServices.getFiles();
return ResponseEntity.ok()
.contentType(MdiaType.MULTIPART_FORM_DATA)
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=somefile")
.body(listOfFiles);
}
but I got error saying 406 could not find acceptable representation