I want to use an html input type file to select the file to crop, if croppie fails the html input will work.
Both pictures will be uploaded, the original through normal form submission, and the cropped one in base64
(or blob
)
This may be bad because you store two files, but the advantage is you have the original untouched file, a backup method just in case croppie fails, and the original file might be a webp, jpeg or png, but croppie forces you to choose just one format. So you keep the original format.
We cannot put the cropped file inside the input type=file
because those controls are read-only for security reasons
so we need to create: ``