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

This commit is contained in:
2026-05-22 16:47:32 +07:00
parent 992cc1747c
commit 59c1b30669
@@ -606,10 +606,14 @@ 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=\"" + entityResponse.getFileName() + "\"") "attachment; filename*=UTF-8''" + encodedFilename)
.body(bytes); .body(bytes);
} catch (FileEntityNotFoundException e) { } catch (FileEntityNotFoundException e) {
Map<String, Object> errorData = new HashMap<>(); Map<String, Object> errorData = new HashMap<>();