From 29ec0748d8e547c93ac595fc65747a4e6e6e646e Mon Sep 17 00:00:00 2001 From: Denis Gorin Date: Mon, 28 Sep 2020 11:13:31 +0700 Subject: [PATCH] add config media types to files list in dropdown --- src/Controller/Backend/Async/FileListingController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/Backend/Async/FileListingController.php b/src/Controller/Backend/Async/FileListingController.php index 836e8d566..1fe2a748c 100644 --- a/src/Controller/Backend/Async/FileListingController.php +++ b/src/Controller/Backend/Async/FileListingController.php @@ -48,7 +48,7 @@ public function index(): JsonResponse private function getFilesIndex(string $path, string $type): Collection { if ($type === 'images') { - $glob = '*.{jpg,png,gif,jpeg,avif,webp}'; + $glob = sprintf('*.{%s}', $this->config->getMediaTypes()->implode(',')); } else { $glob = null; }