It should be implemented a better file plugin, like filepond for example.
Here is an example that I did with some customizations:
You could also share a codepen snippet
It will be nice if you could commit the code. Looks good.
You can also checkout Uppload for file handling: https://github.com/elninotech/uppload
Most helpful comment
You could also share a codepen snippet