SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.9k stars 1.23k forks source link

sap.m.upload.FilePreviewDialog doesn't show preview for mimetype image/jpg #4061

Open geert-janklaps opened 1 month ago

geert-janklaps commented 1 month ago

OpenUI5 version: 1.24.1

Browser/version (+device/version): Microsoft Edge, Google Chrome, Safari

Any other tested browsers/devices(OK/FAIL): Windows, Iphone

Steps to reproduce the problem: Currently the file preview dialog doesn't preview a jpg files if the mimetype is set to image/jpg, because the expected mimetype for a jpg file is image/jpeg. (hardcoded in the FilePreviewDialog, see referenced line below) Some systems set the mimetype for a jpg file to image/jpg (for example SAP Service Cloud).

https://github.com/SAP/openui5/blob/9c11476b266b8c68b007386a0260c09638bb451b/src/sap.m/src/sap/m/upload/FilePreviewDialog.js#L28

What is the expected result? A preview to be show if the mimetype is image/jpg (same as image/jpeg)

What happens instead? The file preview not available placeholder is shown

TeodorTaushanov commented 4 weeks ago

Hi,

Could you guide us through the steps on how to recreate it?

Best, Teo