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

Force file download

Contributor ,
Sep 29, 2007 Sep 29, 2007
I am trying to create a page with downloadable pdf documents. The link should open a download dialog box to prompt the user to save or open the file, notjust open the file in the browser.

I am using the code below which seems to work, except the files are unopenable. Acrobat says they are either a not supported file type or a damaged file.

311
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

correct answers 1 Correct answer

Contributor , Oct 01, 2007 Oct 01, 2007
On a windows server, cfcontent requires an absolute path. Updated (working) code below.

Translate
Contributor ,
Oct 01, 2007 Oct 01, 2007
LATEST
On a windows server, cfcontent requires an absolute path. Updated (working) code below.

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