Your file is uploaded, but you get it in javascript, in the data parameter of your call, because you are calling it using Ajax.
You use a handler - therefore ajax is not needed here, and the simplest thing used with javascript is this:
window.location = "FileDownload.ashx?parametres=22";
or with a simple link like
<a target="_blank" href="FileDownload.ashx?parametres=22" >download...</a>
Ah and send the parameters via url, you cannot publish them that way.
You can also read: What is the best way to download a file from a server
Aristos
source share