I have a flask app in which it has a button to download an HTML report. The download button when hit creates an xlsx file. It worked fine until that app was running on my local server because the python code found my Downloads
directory no matter what os it is using python's os
module.
Now the app is deployed on a remote server, in this case, how do you let the system know the client's download directory path where this xlsx file can then be created? Or any other pointers for a better solution if I'm missing something?
send_file
function, you can pass theattachment_filename
arg which in turn passes the correctContent-Disposition
HTTP header). See another answer I wrote which kinda relates to this topic.