Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049134Openbravo ERP00. Application dictionarypublic2022-04-14 10:462022-04-26 14:27
jmelin 
cberner 
highminoralways
closedfixed 
5
 
PR21Q4.5PR21Q4.5 
Core
Production - Confirmed Stable
2020-11-09
PR21Q1
https://gitlab.com/openbravo/product/openbravo/-/commit/f9de9389948227a1510d21a57811818a1e9c880c [^]
No
0049134: JIRA 2879 - Backoffice - can't import a bmp file
When trying to import a bmp file using an image import button
Then an error is triggered that said only jpg, png or bmp can be imported

So bmp can't be imported despite being an authorized type
Connect to back office
Open "Products" window and select any product
Try to import a bmp as product image

=> Error is triggered and image is not imported
No tags attached.
blocks defect 0049062 closed cberner JIRA 2879 - Backoffice - can't import a bmp file 
Issue History
2022-04-26 13:07cbernerTypedefect => backport
2022-04-26 13:07cbernerTarget Version => PR21Q4.5
2022-04-26 13:10hgbotNote Added: 0136749
2022-04-26 14:27hgbotResolutionopen => fixed
2022-04-26 14:27hgbotStatusscheduled => closed
2022-04-26 14:27hgbotFixed in Version => PR21Q4.5
2022-04-26 14:27hgbotNote Added: 0136753
2022-04-26 14:27hgbotNote Added: 0136754

Notes
(0136749)
hgbot   
2022-04-26 13:10   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/570 [^]
(0136753)
hgbot   
2022-04-26 14:27   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 07e7582f22b101a52faee0687095c06796362739
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 26-04-2022 13:09:43
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/07e7582f22b101a52faee0687095c06796362739 [^]

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 2d1e219013bf482f68d4c6809f367dcad8f28e7d

---
M src/org/openbravo/erpCommon/utility/MimeTypeUtil.java
---
(0136754)
hgbot   
2022-04-26 14:27   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/570 [^]