Ableitung des Mime Type funktioniert in Testumgebung nicht
Aktuell verwenden wir Files.probeContentType
, aber:
Be aware that Files.probeContentType(Path) is buggy on several OSes and a lot of bug reports have been filed. I have had a problem with software working on ubuntu but failing on windows. It seemed that on windows Files.probeContentType(Path) always returned null. It was not my system so I didn't check the JRE or windows version. It was windows 7 or 8 probably with oracle JRE for java 7.
https://stackoverflow.com/questions/51438/how-to-get-a-files-media-type-mime-type/847849#847849
Bei Download von Dateien zu Aufgaben kommt:
org.springframework.http.InvalidMediaTypeException: Invalid mime type "null": 'mimeType' must not be empty
at org.springframework.http.MediaType.parseMediaType(MediaType.java:620) ~[spring-web-5.3.9.jar:5.3.9]
at de.hsrm.sls.subato.shared.helper.ResourceHelper.buildFileResponse(ResourceHelper.java:43) ~[classes/:na]
at de.hsrm.sls.subato.shared.helper.ResourceHelper.buildFileResponse(ResourceHelper.java:31) ~[classes/:na]
at de.hsrm.sls.subato.tasks.task.TaskController.downloadFile(TaskController.java:122) ~[classes/:na]
In Testumgebung wird Haskell nicht erkannt, bei mir lokal schon.
Ableitung des Content Types ersetzen mit Apache Tika.