A public key set in your widget tells it which account uploads will go to.
You can set that option in the
UPLOADCARE_PUBLIC_KEY = 'demopublickey';
You’re now ready to insert the widget element into your form,
<input type="hidden" role="uploadcare-uploader" name="my_file" />
By default, the widget library looks for inputs with that specific
role attribute and adds widgets where it finds those. When a file is uploaded with your widget,
<input> gets a CDN URL with a UUID of that file. Your server then receives such link instead of file contents.
We suggest placing a widget somewhere at the top of your form. Unlike regular inputs, our widget starts uploading files right after they get selected by a user, not on form submission. This helps users fill out the rest of your form while their files are uploading in the background. That can be a real time saver.