Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Nov 13, 2024
1 parent 400de02 commit 55ad29f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions concrete/controllers/backend/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,17 @@ public function fetchIncomingFiles()
$incomingStorageLocation = $incoming->getIncomingStorageLocation()->getDisplayName();

$files = $incoming->getIncomingFilesystem()->listContents($incomingPath);
$files = array_values(array_filter(
$files,
static function (array $item) {
return $item['type'] === 'file';
}
));

foreach (array_keys($files) as $index) {
if (!isset($files[$index]['extension'])) {
$files[$index]['extension'] = '';
}
$files[$index]['allowed'] = $fh->extension($files[$index]['basename']);
$files[$index]['thumbnail'] = FileTypeList::getType($files[$index]['extension'])->getThumbnail();
$files[$index]['displaySize'] = $nh->formatSize($files[$index]['size'], 'KB');
Expand Down

0 comments on commit 55ad29f

Please sign in to comment.