Martin_Kentico
-
11/27/2006 4:43:37 PM
Re: Remove "Do you want to open or save this file?" prompt from link to html page
Hello Sharon,
By default, all files except images are disposed as the attachment files, you can change the default disposition by setting up the GetFile.aspx query parameter "?disposition=inline" (to display directly) or "?disposition=attachment" to get the open/save dialog
If you need to apply the disposition type to certain files in general, you may need to edit the code in GetFile.aspx.cs and add your custom extension condition to the code.
The code you would be interested in is:
Response.AddHeader("Content-Disposition", "inline; filename=" + FilenameEncode(fileName));
for inline file disposition and:
Response.AddHeader("Content-Disposition", "attachment; filename=" + FilenameEncode(fileName));
for the attachment disposition
If I can be of any further help, please let me know
Best regards
|