You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an asset field to upload a PDF and clicking on "upload asset" (selecting asset to upload in a dialog box), an error will occur during the transform of the pdf file. It only occurs when uploading though the dialog box. However, If I drag a PDF file into the field it uploads and transforms the image properly.
I have worked around this problem by including the previous transformPdfsOnUpload functionality that was available in version for craft 3. When I turn off transformPdfsOnUpload, there is no error when clicking on "upload asset" button.
The text was updated successfully, but these errors were encountered:
We have encountered this issue also. Uploading the PDF triggers the error though, if uploaded separately, the file can be chosen and there is no error.
In case someone else comes across this for this edge-case reason: 'improper image header' can also occur if the server is incapable of reaching itself. Ex: if you've blocked access to the world excluding certain IPs, but the server IP is not in that exclusion list (ie: it's not allowed).
When using an asset field to upload a PDF and clicking on "upload asset" (selecting asset to upload in a dialog box), an error will occur during the transform of the pdf file. It only occurs when uploading though the dialog box. However, If I drag a PDF file into the field it uploads and transforms the image properly.
Here is the error from the weblog:
2023-07-20 07:54:48 [web.ERROR] [ImagickException] improper image header `/home/forge/dev.santiccioli.com/storage/runtime/temp/2802430.png' @ error/png.c/ReadPNGImage/4092 {"trace":["#0 /home/forge/dev.santiccioli.com/vendor/spatie/pdf-to-image/src/Pdf.php(42): Imagick->pingImage()","#1 /home/forge/dev.santiccioli.com/vendor/bymayo/pdf-transform/src/services/PdfTransformService.php(117): Spatie\\PdfToImage\\Pdf->__construct()"
I have worked around this problem by including the previous transformPdfsOnUpload functionality that was available in version for craft 3. When I turn off transformPdfsOnUpload, there is no error when clicking on "upload asset" button.
The text was updated successfully, but these errors were encountered: