Skip to content

Commit

Permalink
fix: allow automatic uploads and uppercase file extensions, closes #3018
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jun 23, 2024
1 parent 6c7ade6 commit 2eeca01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion phpmyfaq/admin/assets/src/content/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export const renderEditor = () => {
],
image_dimensions: true,
images_upload_url: 'index.php?action=ajax&ajax=image&ajaxaction=upload',
automatic_uploads: false,
automatic_uploads: true,
});
}
};
2 changes: 1 addition & 1 deletion phpmyfaq/admin/media.browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
} else {
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(PMF_ROOT_DIR . '/images/'));
foreach ($files as $file) {
if ($file->isDir() || !in_array($file->getExtension(), $allowedExtensions)) {
if ($file->isDir() || !in_array(strtolower($file->getExtension()), $allowedExtensions)) {
continue;
}
$path = str_replace(dirname(__DIR__) . '/', '', (string) $file->getPath());
Expand Down

0 comments on commit 2eeca01

Please sign in to comment.