Problem when using Cloud Drive
Hello,
First of all: thank you for this great extension!
I found the following issue: I put the images in Amazon AWS Cloud Drive. I'm using the extension aus_driver_amazon_s3 to connect TYPO3 FAL to S3 and Cloudfront.
Your extension has two files which does not support non-local filesystems:
Resources/Private/Partials/GridGallery/Gallery.html line 17:
<a href="{f:uri.image(src: file.publicUrl, width: settings.media.popup.width, height: settings.media.popup.height)}"
I changed this to:
<a href="{f:uri.image(image: file, width: settings.media.popup.width, height: settings.media.popup.height)}"
(I pass whole the image object to uri.image)
Classes/ViewHelpers/ImageSizeViewHelper.php line 43 ff
/**
* Returns the width or height of an image by the given path
*
* @return int
* @throws Exception
*/
public function render(): int
{
$src = $this->arguments['src'] ?? null;
if ($src === null) {
throw new Exception('No source image given', 1560760753);
}
$type = $this->arguments['type'] === 'width' ? 0 : 1;
if (filter_var($src, FILTER_VALIDATE_URL) !== false) {
$file = $src;
} else {
$file = GeneralUtility::getFileAbsFileName($this->getRelativePath($src));
if (false === file_exists($file) || true === is_dir($file)) {
throw new Exception('Cannot determine info for "' . $file . '".', 1560760754);
}
}
$imageSize = getimagesize($file);
return (int)$imageSize[$type];
}
(I add a test if $src is a valid url - if so I pass this to getimagesize - if not the "old" procedure is done to get the path)
Perhaps you can check this changes and put them into the next version!?
Thank you and all the best
Christian
Edited by Philipp Müller