sap.m.plugins.UploadSetwithTable: mediaTypes in lowercase error
What is the issue and how can we reproduce it?
- Open the sample https://sapui5.hana.ondemand.com/1.136.2/#/entity/sap.m.plugins.UploadSetwithTable/sample/sap.m.sample.UploadSetwithTablePlugin.ResponsiveTableSimple
- Add "mediaTypes" property: mediaTypes="application/vnd.ms-excel.sheet.macroEnabled.12,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- Try to upload first a xlsx file (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) and then a xlsm file (application/vnd.ms-excel.sheet.macroEnabled.12 - Microsoft Excel Macro-Enabled Worksheet).
- The xlsx file will be uploaded but the xlsm file will not.
To create an XLSM file just open excel and then select XLSM extension from the list in save dialog.
Error:
Checking the code (https://github.com/UI5/openui5/blob/master/src/sap.m/src/sap/m/plugins/UploadSetwithTable.js) mediatypes are processed and rewritten in lowercase. But our mediaType contains an uppercase letter (application/vnd.ms-excel.sheet.macroEnabled.12). Checking in https://www.iana.org/assignments/media-types/media-types.xhtml there are several media types that contain uppercase letter
Expected behavior:
The list passed into "mediaTypes" parameter should be case-sensitive
Which OpenUI5 version is your project targeting?
1.136.2
Is the issue device- or browser-specific?
No response
Confirmation
- [x] I have searched the existing issues and reviewed the relevant documentation as well as the API reference.
- [x] I am not disclosing any internal or sensitive information.
I have the same issue with sap.m.upload.UploadSet on version 1.120.32
Hello @aboccassiniavvale,
Thank you for reporting this incident.
I’ve tried to reproduce the issue by carefully following the steps you described, but was not able to observe the problem.
To clarify my approach, I recorded a short video showing my attempt to reproduce the issue. Could you please take a look and let me know if I might be missing something or not testing it correctly?
Thank you in advance!
Best regards, Konstantin
https://github.com/user-attachments/assets/93d53bcd-a455-48c2-9606-1c929cf8a7b1
Hello Konstantin,
I tried the steps again and noticed the following behavior:
- On Windows, the problem persists;
- On Mac, as you showed, it works correctly.
Best regards, Alessandro
Hello @aboccassiniavvale , Thank you for sharing this finding. I've created an internal incident DINC0601118. The status of the issue will be updated here in GitHub.
Regards, Stefan