@@ -357,15 +357,13 @@ public class ApiController {
|
||||
MessageCode.FILE_DOWNLOAD_ERROR.getDescription(),
|
||||
errorData));
|
||||
}
|
||||
|
||||
String contentType = determineContentType(filePath);
|
||||
String contentType = determineContentType(filePath);
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.contentLength(fileSize)
|
||||
.contentType(MediaType.parseMediaType(contentType))
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION,
|
||||
"attachment; filename=\"" + entityResponse.getOriginalFileName() +
|
||||
"_nocopy_protected" + "\"")
|
||||
"attachment; filename=\"" + entityResponse.getOriginalFileName() + "\"")
|
||||
.body(resource);
|
||||
} catch (FileEntityNotFoundException e) {
|
||||
Map<String, Object> errorData = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user