I'm developing an app which has a function for uploading .xls files but everytime I want to test code I have to select the file or drag and drop it to the field
This is the code I use:
const handle_change = (e) => {
    e.stopPropagation()
    e.preventDefault()
    let files
    if(e.type == "drop") {
        files = e.dataTransfer.files
    }else{
        files = e.target.files
    }
    const f = files[0]
    const reader = new FileReader()
    reader.onload = function(e) {
        const data = new Uint8Array(e.target.result);
    ...
Is there anyway to automate this? I mean, when I reload the page it loads the file automatically.
Thank you!
 
     
    