JSFiddle - React, Tailwind, and code Playground

by Tahir Ahmed

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>

JavaScript

const input = document.createElement('input');
input.setAttribute('type', 'file');
document.body.appendChild(input);
const onImageSelect = () => {
	console.log('onImageSelect: input.files', input.files);
};
input.addEventListener('change', onImageSelect);