Merge pull request 'JS Uploader: "jpg" added to the list of allowed file extensions' (#1515) from heluecht/friendica-addons:jsupload into 2024.06-rc

Reviewed-on: #1515
This commit is contained in:
Tobias Diekershoff 2024-06-16 16:47:11 +02:00
commit ed07c987a6

View file

@ -50,7 +50,11 @@ function js_upload_post_init(array &$b)
// list of valid extensions
$allowedExtensions = [];
foreach (Images::IMAGETYPES as $type) {
$allowedExtensions[] = image_type_to_extension($type, false);
$extension = image_type_to_extension($type, false);
if ($extension == 'jpeg') {
$allowedExtensions[] = 'jpg';
}
$allowedExtensions[] = $extension;
}
// max file size in bytes