bymayo / craft-pdf-transform

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

Failed to open stream: No such file or directory #20

Open CMeldgaard opened 1 year ago

CMeldgaard commented 1 year ago

The following line fails, if the public url of an assets doesn't match the server path. For instance if the public url ir /dowloads but the server path is /app/web/downloads it fails.

https://github.com/bymayo/craft-pdf-transform/blob/9413a243d0ddd0dd1ec309a0d8d45a97f25e12cf/src/services/PdfTransformService.php#L111

My suggestion would be to use the path instead of the url

bymayo commented 1 year ago

@CMeldgaard Did you close this because it worked in the end or not?

I'm likely going to change this as path does work better, especially if the assets don't have a public URL's

CMeldgaard commented 1 year ago

@bymayo i closed it as we found a solution based on an older issue. But yeah, filepath would be a good idea.

Perhaps a setting where you can switch between them, in case an external storage like S3 is used. That would give as much flexibility as possible for the developers implementing it :)

useralberto commented 3 months ago

Hello any news about this ? @bymayo