Skip to content

Commit d1b4e3d

Browse files
committed
fix: handle case-insensitive file extensions in media uploader
Ensure the media uploader handles file extensions in a case-insensitive manner by converting them to lower case before validation.
1 parent 60e840c commit d1b4e3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Backend/view/adminhtml/web/js/media-uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ define([
7575
byteConvert(currentFile.size);
7676

7777
// check if file is allowed to upload and resize
78-
allowedResize = $.inArray(currentFile.extension, allowedExt) !== -1;
78+
allowedResize = $.inArray(currentFile.extension?.toLowerCase(), allowedExt) !== -1;
7979

8080
if (!allowedResize) {
8181
fileUploader.aggregateError(currentFile.name,

0 commit comments

Comments
 (0)