Technical support This forum is closed.
Version 1.x > Technical support > Remove "Do you want to open or save this file?" prompt from link to html page View modes: 
User avatar
Guest
norashlea - 11/23/2006 10:26:42 PM
   
Remove "Do you want to open or save this file?" prompt from link to html page
Hi,

How can I prevent the dialog prompt when a link to a html page is inserted using the FCKEditor of a content area on one of the site pages?

Have a situation where a regular (external system) eNewsletter will be uploaded as a html file into the system, with a link to it from one of the site's aspx pages created via CMSDesk. But in all the browsers I've tried (IE vers. 6 and 7, Firefox, Netscape and Safari) the user is prompted with a dialog to open or download.

Thanks,
Sharon.

User avatar
Member
Member
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