In my application, we have a notification functionality, when a link is completed by an user. That notification will have a link to file stored on server. While sending the notification I'm preparing a link to file like this
<a href='LINKTOFILEOnSERVER'>FileName</a>
This is what also stated here
Now, in the post above there is point to set "content-type"
and "Content-Disposition"
but I'm not sure how can I set this in my case.
Can anyone help here?
The web server which will serve the file will need to set those headers. You cannot set those in anchor element.
If the files are static (physically located on disk), one way to do it for IIS is to set HTTP response headers for all requests coming to the folder where the files are located: