[BUGFIX] Extract metadata for new files in storage 42/57842/5
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>
Sun, 19 Aug 2018 20:40:53 +0000 (22:40 +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/57842
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
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 ca27c1b..e6c26a3 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;
     }