Altinn / app-lib-dotnet

Libraries used in Altinn Apps
BSD 3-Clause "New" or "Revised" License
7 stars 10 forks source link

Attachment: Extension in UPPERCASE fails upload #667

Open SimenRokaas opened 1 month ago

SimenRokaas commented 1 month ago

Description of the bug

Uploading somefile.png works. Uploading somefile.PNG (copy of the first file just with uppercase extenstion) fails.

Steps To Reproduce

Upload a file with uppercase extension in an upload component.

Additional Information

Ref https://altinn.slack.com/archives/C02EJ9HKQA3/p1717138743868539 Branch: https://altinn.studio/repos/dsb/int-1017-personopplysninger/src/branch/master

SimenRokaas commented 1 month ago

Possible cause is the check against allowed extensions. This check should be case insensitive, so if "png" is allowed then all of "png", "PNG", "pNg" etc are also allowed.

HauklandJ commented 1 month ago

@SimenRokaas Unable to reproduce:

https://github.com/Altinn/app-lib-dotnet/assets/42615991/6bfc3958-db7a-4d76-9525-014019a4d511

HauklandJ commented 1 month ago

Reprodusert med DSB sin app.

danielskovli commented 1 month ago

Kan bekrefte at https://github.com/Altinn/app-lib-dotnet/pull/676 fikser problemet i DSB sin app:

bilde

Men frontend bør også kanskje endre sin pattern matching med tanke på ikonet som vises.