The <file-input>
element is activated like other input elements, either by click or by key input. Once activated, the user is prompted with a dialog to select an image from their local machine.
When the user selects an image, the image is processed into an <img>
element and displayed in the input along with the "Clear Selection" and "View Full Size" options.
The "Clear Selection" option will clear the input, which ensures that any FormData
generated from a wrapping <form>
will not include the previously selected image.
The "View Full Size" option will provide the selected image's image data to the browser. In most browsers, this will open the image in a new context (Tab/Window) for full-size viewing.