Html – Return text error message when browser expecting a .XLS or other binary file
My Flask server generates an HTML file containing an anchor tag resembling this: <a href="https://example.com/href_without_extension" download="excelfile.xls"> Download Excel file </a> Generating the Excel file can be slow. If the user clicks the link before the file has been completely generated,…