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?
You can get the Dropzone object from Grav's file field or the pagemedia field (which I switched to) and intercept the image upload with the Dropzone's "transformFile" hook.
At this point I can manipulate the dropped image and return it to Grav for uploading.