[BUGFIX] Extract metadata for new files in storage 60/57960/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 9 Aug 2018 14:18:03 +0000 (16:18 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 20 Aug 2018 05:47:48 +0000 (07:47 +0200)
If files in a remote storage are fetched the first time by FAL, the
metadata of these files is now extracted automatically, if the storage
supports this feature.

Resolves: #85786
Releases: master, 8.7
Change-Id: I4006ea2f39bbbbf0d6fe6a1f2adf2e79cdfbd5c5
Reviewed-on: https://review.typo3.org/57960
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/core/Classes/Resource/Index/Indexer.php

index 56d505a..c4165b9 100644 (file)
@@ -72,6 +72,11 @@ class Indexer
         $record = $this->getFileIndexRepository()->addRaw($fileProperties);
         $fileObject = $this->getResourceFactory()->getFileObject($record['uid'], $record);
         $this->extractRequiredMetaData($fileObject);
+
+        if ($this->storage->autoExtractMetadataEnabled()) {
+            $this->extractMetaData($fileObject);
+        }
+
         return $fileObject;
     }