M
M
Muxto2016-04-15 16:07:09
ASP.NET
Muxto, 2016-04-15 16:07:09

How to save file from ULR via Save File Dialog in browser?

Good afternoon.
The file is on Azure Storage.
Here is the URL - " https://ipcamstorageks.blob.core.windows.net/vstor... "
With <a href=url> in some browsers it opens in the same window. How can I force the browser to force save it as a file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
adminstock, 2016-05-02
@adminstock

The server should return the Content-Disposition HTTP header :
The code will be something like this:

Response.AddHeader("content-disposition", string.Format("attachment; filename={0}.xml", "имяФайла"));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question