JSFiddle - React, Tailwind, and code Playground
HTML
<html><head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
</head>
<body>
<div style="width:1000;height:1000px;border:1px solid;">
<input type="file" name="file" id="file"/>
</div>
</body>
</html>
JavaScript
$(document).ready(function(){
$("div").on('drop',function(e){
e.preventDefault();
var files=e.originalEvent.dataTransfer.files;
alert(files);
});
$("#file").change(function(e){
var files=e.dataTransfer.files;
alert(files);
});
});