I am building a simple HTML image uploader. The user can select many images using a file input, and for each image a preview is created.
To send the images to the server I was thinking about attaching an input
to each image so that they are automatically sent when the form is submitted.
An element would look like this:
<div>
<input type="file" class="hidden" name="model[images][]">
<img src="base 64 image">
</div>
The problem is that of course I can't set an arbitrary file for the file input, so what's the simplest solution to send many files from the same form without using a single input?