I am creating and using a custom image uploader within my form which is submitted via ajax - everything works perfect.
I am allowing users to upload multiple images e.g:
<input type="file" name="files[]" accept="image/*" class="files-data" id="upload_images" multiple="">
The problem that I am facing, is that when a user clicks the "Image Upload Button" multiple times, each time the input (the array of previously uploaded images) is reset.
So if a user uploads 3 images, great - that works fine. But if they decide to open the file upload again and upload another image or two, the original 3 files are gone.
I am not looking for a plugin to do this, and I know that this can be done from other image uploaders I have seen.
Do you know how I can maintain previously uploaded images when the multiple input field is opened more than once?
Thank-you for any help.