I am having the user input a file for the frontend. I want to grab the file from the html with js and pass it to Python eel to do calculations with it. How can I make this happen?
html
<input type="file" id="upload-file">
JS
let uploadedFile = document.getElementById("upload-file").files;
eel.read_file(uploadedFile);
python ell main.py
@eel.expose
def read_file(uploaded_file):
print(uploaded_file) # outputs: uploaded_file
# do something with the file