kirby
kirby copied to clipboard
File blueprint: error when create/format option is set and document is uploaded
Description
When a file blueprint has the format option set so that images get converted to another format, uploading a PDF results in an error imagecreatefromstring(): Data is not in a recognized format
. The uploaded file is corrupt due to the conversion process.
Expected behavior
Images should be converted to the format defined in the blueprint. Any other file should be uploaded as is.
Screenshots
To reproduce
- Create a new file blueprint or use default file blueprint.
- Add the following properties to the blueprint:
create:
format: webp
- Upload a PDF using that blueprint
- See error
Your setup
Kirby 4.0.1 up to 4.1
Console output
First error while uploading. Second error while trying to get a thumbnail for the uploaded PDF that doesn't exist.
Your system (please complete the following information)
- Device: Macbook
- OS: macOS
- Browser: Firefox
- Version: 122.01
Additional context