• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

a href not working in IE ( Downloading documents )

New Here ,
Sep 14, 2015 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

873

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
community guidelines
LEGEND ,
Sep 14, 2015 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" />

Votes

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
community guidelines
New Here ,
Sep 14, 2015 Sep 14, 2015

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines
Resources
Documentation