openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.plugins.UploadSetwithTable: mediaTypes in lowercase error

Open aboccassiniavvale opened this issue 1 year ago • 4 comments

What is the issue and how can we reproduce it?

  1. Open the sample https://sapui5.hana.ondemand.com/1.136.2/#/entity/sap.m.plugins.UploadSetwithTable/sample/sap.m.sample.UploadSetwithTablePlugin.ResponsiveTableSimple
  2. Add "mediaTypes" property: mediaTypes="application/vnd.ms-excel.sheet.macroEnabled.12,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  3. 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).
  4. 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.

aboccassiniavvale avatar Jul 08 '25 12:07 aboccassiniavvale

I have the same issue with sap.m.upload.UploadSet on version 1.120.32

aboccassiniavvale avatar Jul 08 '25 13:07 aboccassiniavvale

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

kgogov avatar Aug 01 '25 11:08 kgogov

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

aboccassiniavvale avatar Aug 01 '25 12:08 aboccassiniavvale

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

StefanDimitrov04 avatar Aug 07 '25 13:08 StefanDimitrov04