I'd like to pick up a .csv file from local computer, from where python runs the server,
In my python file I currently got
elif msgdict.get("cmd") == "DOWNLOAD":
#get the file from local drive, and send for opening/download
And then my html has the button and calls the javascript function:
<button id="btn_folder" type="button" class="btn btn-default" onclick="downloadFile()"><span class="glyphicon glyphicon-file"></span></button>
An my javascript:
function downloadFile() //This function will download the data
{
var cmd = {"cmd":"DOWNLOAD"};
ws_control.send(JSON.stringify(cmd));
//The user should be able to download the file or the data should show up in another tab...
}
I'm very new to literally everything I am doing. I know how to open a file for read and write, but I don't know how to actually send the completed data over.