Используя C # в качестве примера, вот как можно заставить загрузку файла после нажатия кнопки, ссылки и т. Д ...
public void DownloadFileLink_Click(object sender, EventArgs e)
{
//Get the file data
byte[] fileBytes = Artifacts.Provider.GetArtifact(ArtifactInfo.Id);
//Configure the response header and submit the file data to the response stream.
HttpContext.Current.Response.AddHeader("Content-disposition", "attachment;filename=" + "myDynamicFileName.txt");
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.BinaryWrite(fileBytes);
HttpContext.Current.Response.End();
}
Имея это в виду, что вам нужно посмотретьзаголовок в ответе, заголовок будет содержать элемент расположение содержимого , который будет содержать имя файла, передаваемого в ответе.