102124: Avoid null pointer when checking disposition

This commit is contained in:
Nona Luypaert
2023-06-08 20:47:27 +02:00
parent bca98cd8f4
commit a00dd83a0c

View File

@@ -208,6 +208,10 @@ public class BitstreamRestController {
}
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")));
boolean download = formats.contains(format.getMIMEType());
if (!download) {