Skip to content

Instantly share code, notes, and snippets.

@kitsunet
Created June 18, 2015 11:37
Show Gist options
  • Save kitsunet/d915d9d38573abd3170e to your computer and use it in GitHub Desktop.
Save kitsunet/d915d9d38573abd3170e to your computer and use it in GitHub Desktop.
// $path sollte das Verzeichnis mit den Bildern sein
$images = \TYPO3\Flow\Utility\Files::readDirectoryRecursively($path)
foreach($images as $imageFilePath) {
$resource = $this->resourceManager->importResource($imageFilePath);
$image = new \TYPO3\Media\Domain\Model\Image($resource);
$this->assetRepository->add($image);
unlink($imageFilePath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment