mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-11 21:04:31 +00:00
JS Uploader: "jpg" added to the list of allowed file extensions
This commit is contained in:
parent
7f0cf2527c
commit
af868f45ab
1 changed files with 8 additions and 4 deletions
|
@ -50,7 +50,11 @@ function js_upload_post_init(array &$b)
|
||||||
// list of valid extensions
|
// list of valid extensions
|
||||||
$allowedExtensions = [];
|
$allowedExtensions = [];
|
||||||
foreach (Images::IMAGETYPES as $type) {
|
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
|
// max file size in bytes
|
||||||
|
|
Loading…
Reference in a new issue