bymayo / craft-pdf-transform

Transform a PDF page to an image (JPEG, PNG)
MIT License
12 stars 8 forks source link

Does not work with Amazon S3 #1

Closed andrewmenich closed 1 year ago

andrewmenich commented 5 years ago

I know the Readme says it has only been tested locally. I just wanted to share the error stack trace I received when trying with S3 as I thought it might be of some help for future development.

Getting unknown property: craft\awss3\Volume::path in /home/forge/example.com/vendor/yiisoft/yii2/base/Component.php:154

#0 /home/forge/example.com/vendor/bymayo/pdf-transform/src/services/PdfTransformService.php(66): yii\base\Component->__get('path')
#1 /home/forge/example.com/vendor/bymayo/pdf-transform/src/services/PdfTransformService.php(80): bymayo\pdftransform\services\PdfTransformService->getImagePath(Object(craft\elements\Asset), 'path')
#2 /home/forge/example.com/vendor/bymayo/pdf-transform/src/variables/PdfTransformVariable.php(31): bymayo\pdftransform\services\PdfTransformService->url(Object(craft\elements\Asset))
#3 /home/forge/example.com/vendor/twig/twig/lib/Twig/Extension/Core.php(1626): bymayo\pdftransform\variables\PdfTransformVariable->url(Object(craft\elements\Asset))
#4 /home/forge/example.com/vendor/craftcms/cms/src/helpers/Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(bymayo\pdftransform\variables\PdfTransformVariable), 'url', Array, 'method', false, false)
#5 /home/forge/example.com/storage/runtime/compiled_templates/2b/2badab135d869102039d87425f0ab544d5ed8ceca3e20a24042ca872a30ad2f7.php(41): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(bymayo\pdftransform\variables\PdfTransformVariable), 'url', Array, 'method')

Versions:

Craft v3.0.26.1 PDF Transform v1.0.2 Amazon S3 v1.0.8

bymayo commented 5 years ago

Thanks @andrewmenich - Is this when your trying to save the PDF to S3?

RyanRoberts commented 3 years ago

@bymayo Just want to add that I'm getting the same problem with DigitalOcean Spaces (compatible with the S3 API), on both uploading a PDF to assets and when trying to render the image on the frontend.

Getting unknown property: vaersaagod\dospaces\Volume::path

adrienne commented 2 years ago

@bymayo I also have this error. Any chance of making it work somehow?

josh-attwood commented 2 years ago

Also having the same issue here. We tend to store all our assets on S3 so would be great if there was a solution to this!

bymayo commented 1 year ago

@josh-attwood Can you confirm if your using Craft 4? It's highly unlikely i'll build this feature in to the Craft 3 version of this project now Craft 4 is available. But the good news is, I've been testing this feature recently so for Craft 4 it should be available soon.

josh-attwood commented 1 year ago

@bymayo It's currently Craft 3 but we'll be migrating over to Craft 4 in the next couple of weeks. If it'll be available for Craft 4 that would be amazing!

bymayo commented 1 year ago

@josh-attwood Been a long time coming, but this has now been added in to 1.0.8 for Craft 3, and Craft 4 will be coming later on today.

Works with Amazon S3, Servd and Local volumes