Created
June 15, 2015 09:04
-
-
Save jp1987/cb57994d117bde1018ca to your computer and use it in GitHub Desktop.
Update single file in TYPO3 FAL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$storageUid = 0; | |
$storage = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getStorageObject($storageUid); | |
$storage->setEvaluatePermissions(FALSE); | |
/** @var \TYPO3\CMS\Core\Resource\Index\Indexer $indexer */ | |
$indexer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Index\\Indexer', $storage); | |
$file = $storage->getFile('/uploads/tx_extension/images/image.jpg'); | |
$indexer->updateIndexEntry($file); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment