-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Description
Hi!
Assuming the script is used with the 'fileType' parameter set as '.jpg,.jpeg,.gif,.png' like in the Sample file, when sending an image named, let's say, IMG_4567.JPG, the javascript will reject the file, applying the status "Forbidden File Type" to it.
To correct this, this part of the javascript file:
// Create an array of file types
var file_types;
if (settings.fileType) {
file_types = settings.fileType.split(',');
}
Could simply be changed to:
// Create an array of file types
var file_types;
if (settings.fileType) {
file_types = settings.fileType.split(',');
file_types = $.merge( $.merge( [], file_types ), file_types.map(item => item.toUpperCase() ));
}
This way, files can be treated whether their name is "IMG_4567.jpg" or "IMG_4567.JPG".
That probably got forgotten on the way, as the equivalent is done in the PHP file, so there's no need to modify anything in it for the bug to be fixed.
LrntL
Metadata
Metadata
Assignees
Labels
No labels