dev add pdf docs protect
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-02-10 20:50:06 +07:00
parent 19330d853d
commit 52e1a7dd02
2 changed files with 5 additions and 5 deletions
@@ -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<>();