Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

a href not working in IE ( Downloading documents )

New Here ,
Sep 14, 2015 Sep 14, 2015

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

937
Translate
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

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" />

Translate
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
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

Translate
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