dev fix download with cyrrilic symbols
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-22 16:37:49 +07:00
parent b557b851e4
commit 992cc1747c
@@ -606,14 +606,10 @@ public class ApiController {
dockViewService.createDockView(viewerRequest, userId); dockViewService.createDockView(viewerRequest, userId);
String filename = entityResponse.getFileName();
String encodedFilename = URLEncoder.encode(filename, StandardCharsets.UTF_8)
.replace("+", "%20");
return ResponseEntity.ok() return ResponseEntity.ok()
.contentType(MediaType.APPLICATION_OCTET_STREAM) .contentType(MediaType.APPLICATION_OCTET_STREAM)
.header(HttpHeaders.CONTENT_DISPOSITION, .header(HttpHeaders.CONTENT_DISPOSITION,
"attachment; filename*=UTF-8''" + encodedFilename) "attachment; filename=\"" + entityResponse.getFileName() + "\"")
.body(bytes); .body(bytes);
} catch (FileEntityNotFoundException e) { } catch (FileEntityNotFoundException e) {
Map<String, Object> errorData = new HashMap<>(); Map<String, Object> errorData = new HashMap<>();