mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-19 07:53:08 +00:00
Merge branch 'w2p-102124_bitstream-formats-download-attachment-7.2' into w2p-102124_bitstream-formats-download-attachment-main
This commit is contained in:
@@ -198,6 +198,10 @@ public class BitstreamRestController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkFormatForContentDisposition(BitstreamFormat format) {
|
private boolean checkFormatForContentDisposition(BitstreamFormat format) {
|
||||||
|
// never automatically download undefined formats
|
||||||
|
if (format == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
List<String> formats = List.of((configurationService.getArrayProperty("webui.content_disposition_format")));
|
List<String> formats = List.of((configurationService.getArrayProperty("webui.content_disposition_format")));
|
||||||
boolean download = formats.contains(format.getMIMEType());
|
boolean download = formats.contains(format.getMIMEType());
|
||||||
if (!download) {
|
if (!download) {
|
||||||
|
Reference in New Issue
Block a user