Form Picker Component
A work in progress HTML File / Image picker with customizable upload backend. Currently, only image picker is implemented.
Usage
Register Component
;
Crop Mode
User will be asked to crop the image no matter what. (Respecting Aspect Ratio)
Auto Mode
User will be asked to crop the image only if the aspect ratio does not match.
Keep Mode
The file will be uploaded as it is. (Ignoring Aspect Ratio)
Reformat Mode
The image will be uploaded as jpeg format without any other modification.
Note: Format attribute can be specified on all modes, except keep mode. You can specify "image/png" to upload it as PNG file.
Resize Mode
The image will be resized automatically for best-fit, respecting the aspect ratio of selected file (not the specified dimensions).
Notes
Adding value and src attribute will automatically make this input pre-picked.
Submitting Form
"valueKey" returned from the upload backend will be submitted in the form with "name" attribute on the element.