Skip to content

Fixes ISSUE-49134: can't import a bmp file

After switching from using tika library to using the jdk URLConnection guessContentTypeFromStream implementation to determine the mimetype of an uploaded file, this broke. The URLConnection implementation is not able to guess if a file is a bmp image or not, it will detect it as a binary file. To fix this, if it is not detected using this API, ImageIO API is used to try and read the file, if that's successful, then the file is a bmp image file.

Regression introduced by commit 2d1e2190

Main MR

Edited by Cristian Berner

Merge request reports

Loading