Html elements being rendered twice with canvas.append?

May I also suggest that you take a look at this plugin: Better Uploader ☁️ [Free Plugin] built by @jonah.deleseleuc. I think it could help you greatly in building your plugin. As the plugin is free you can view the source code and fork/modify it to your needs.

If you are not in need of something custom, you might find the plugin already has everything you need.