Skip to content

Commit

Permalink
[TASK] Remove hack to retrieve file name and path from thumbnail reso…
Browse files Browse the repository at this point in the history
…urce

Makes it compatible with CLI
  • Loading branch information
aertmann committed Nov 20, 2015
1 parent 9bb7d43 commit 08e80eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Aspects/ThumbnailAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public function optimizeThumbnail(JoinPointInterface $joinPoint) {
$thumbnail = $joinPoint->getProxy();
$thumbnailResource = $thumbnail->getResource();

// Easy workaround for getting local path since the resource API doesn't allow it due to support for non local file system targets
$pathAndFilename = realpath(FLOW_PATH_WEB . parse_url($this->resourceManager->getPublicPersistentResourceUri($thumbnailResource), PHP_URL_PATH));
$streamMetaData = stream_get_meta_data($thumbnailResource->getStream());
$pathAndFilename = $streamMetaData['uri'];

$useGlobalBinary = $this->settings['useGlobalBinary'];
$binaryRootPath = 'Private/Library/node_modules/';
Expand Down Expand Up @@ -124,4 +124,4 @@ public function optimizeThumbnail(JoinPointInterface $joinPoint) {
$this->systemLogger->log($cmd . ' (' . ((int)$result === 0 ? 'OK' : 'Error: ' . $result) . ')', LOG_INFO, $output);
}

}
}

0 comments on commit 08e80eb

Please sign in to comment.