Image upload with preprocessing

Hey guys,

I am trying to create a new form field based on the file upload field. My goal is to do some image preprocessing on the temporary image file before uploading it to the destination folder.

Do you have any hints how I get the temporary image file path after the upload via dropzone finishes? Are there events to hook into?

Is there any kind of documentation regarding the Grav Dropzone?

Edit: Found out Grav uses Dropzone,js (https://www.dropzonejs.com/)

@stepbyweb, You could create a plugin and subscribe to event onFormProcessed.

In that event, you can fetch the values submitted by the form. Never tried your specific use-case though…

1 Like