Highlighted

a href not working in IE ( Downloading documents )

New Here ,
Sep 14, 2015

Copy link to clipboard

Copied

Hi

This is the portion of code

<a href="linuxpath/filename.doc">filename.doc</a>

when I click on filename.doc its asking the option to save in mozilla but in IE its directly opening in browser in bad format .

The same code is working fine in CF9 , we just installed CF11 in new Linux env and facing this issue

Can anyone help on this please

Thanks

Amar

Views

778

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

a href not working in IE ( Downloading documents )

New Here ,
Sep 14, 2015

Copy link to clipboard

Copied

Hi

This is the portion of code

<a href="linuxpath/filename.doc">filename.doc</a>

when I click on filename.doc its asking the option to save in mozilla but in IE its directly opening in browser in bad format .

The same code is working fine in CF9 , we just installed CF11 in new Linux env and facing this issue

Can anyone help on this please

Thanks

Amar

Views

779

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 14, 2015 0
LEGEND ,
Sep 14, 2015

Copy link to clipboard

Copied

Instead of linking directly to the file, I'd recommend having the link open a "download.cfm" file, pass an ID or filename as a URL parameter, and use CFCONTENT and CFHEADER to serve the file.  You can set it for inline or attachment - IE will offer you the choice, regardless.

HTH,

^_^

UPDATE:  Here is how I do it, if you're interested.

<cffile action="readbinary" file="#ExpandPath('./')##filename#" variable="pdfBinary" />

<cfheader name="Content-Disposition" value="attachment; filename=#filename#" charset="utf-8" />

<cfcontent type="application/pdf" variable="#pdfBinary#" reset="yes" />

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 14, 2015 0
New Here ,
Sep 14, 2015

Copy link to clipboard

Copied

Thank you for the response .

I will try to check with your code . But there are many places and we are trying to avoid any coding during this migration , so trying to find out any changes to configuration files  or some patch updates that might be available to resolve this issue

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 14, 2015 0