Content-Disposition:attachment not triggering download dialog
I've encountered some unexpected behavior when trying to create a file download functionality on my NodeJS server. I have a REST (express) API that calls for some export data function, which creates a CSV file on the server and uses res.download('path/to/file') to trigger the download. Response headers include Content-Disposition:attachment; filename="indicators.csv" Content-Length:30125 Content-Type:text/csv; charset=UTF-8 so everything seems to be in order. The thing is, I get the response from the server as plain text. The response has all the data the CSV file contains, but does not