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 da
You can try to use a different content-type, so that won't be open as a text file on the browser:
Content-Type:application/ms-excel; charset=UTF-8
Another alternative could be to use application/octet-stream as mime-type to define it as a downloadable file without a better description.
Content-Type:application/octet-stream; charset=UTF-8