Answer the question
In order to leave comments, you need to log in
How to download a file on node.js?
There is a php page that gives the file for download:
$size=filesize("MyProgram.exe");
header("Content-Type: application/exe");
header("Content-Disposition: attachment; filename=MyProgram.exe");
header("Content-Length: $size");
header("Cache-control: private");
$filename="MyProgram.exe";
$fp =fopen($filename, 'r');
fpassthru($fp);
header("Location: MyProgram.exe");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question