diff --git a/Classes/Driver/StorageDriver.php b/Classes/Driver/StorageDriver.php index dd974da..2f5ddd6 100644 --- a/Classes/Driver/StorageDriver.php +++ b/Classes/Driver/StorageDriver.php @@ -694,10 +694,9 @@ public function getFileInfoByIdentifier($fileIdentifier, array $propertiesToExtr $properties = $blob->getProperties(); $fileInfo['size'] = $properties->getContentLength(); $fileInfo['mimetype'] = $properties->getContentType(); - } - return array_merge($fileInfo, [ + $fileInfo = array_merge($fileInfo, [ 'identifier' => $fileIdentifier, 'name' => basename(rtrim($fileIdentifier, '/')), 'storage' => $this->storageUid, @@ -705,6 +704,14 @@ public function getFileInfoByIdentifier($fileIdentifier, array $propertiesToExtr 'folder_hash' => $this->hashIdentifier($this->getParentFolderIdentifierOfIdentifier($fileIdentifier)), 'mtime' => $properties->getLastModified()->format('U'), ]); + + $fileInfoToExtract = []; + + foreach ($propertiesToExtract as $propertyName) { + $fileInfoToExtract[$propertyName] = $fileInfo[$propertyName]; + } + + return $fileInfoToExtract ?: $fileInfo; } /**