'Load multiple files from the same input in JS dynamically

I am having some trouble trying to load and display some images from an input tag with HTML and JS.

The idea is that I want to render a list of videos and I have a button that opens a form to create a new video, there I have an input tag where I select the thumnail and an input tag where I type the URL of the video on Youtube (ideally I would upload a video too but I'm putting an URL for the example).

Here's a CodeSandbox illustrating the issue: https://codesandbox.io/s/relaxed-sara-bfx4ds?file=/src/index.js

Thanks in advance for the help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source