When a user drags and drops a file, how can I retrieve it from the drop
event?
HTML file
<div (drop)="drop($event)" >
drop file here
</div>
TS file
drop (event) {
console.log(event.target.files.length);
// I need to retrieve the file here
}
The console.log prints an error as the files aren't found. What is the correct way to retrieve the file from the drop(event)
function?