This commit is contained in:
@@ -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<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user