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

Using CFCONTENT to deliver word document

New Here ,
May 19, 2006 May 19, 2006

Copy link to clipboard

Copied

website: http://www.datafusionsystems.com/ Click on link to download resume. You will see it downloads it as index.cfm.
Here is the code I am using.

<cfif isdefined("URL.downloadresume")>
<cfcontent file="c:\domains\datafusionsystems.com\wwwroot\noah_britton_resume.doc" type="application/msword" deletefile="no">
</cfif>

I have no idea why it is behaving strangely. I'm not using CFHEADER of CFCACHE on this page. Thanks!
TOPICS
Advanced techniques

Views

474

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

correct answers 1 Correct answer

Community Expert , May 20, 2006 May 20, 2006
You should use both tags, cfcontent and cfheader. It is also a good idea to check beforehand whether the file exists.

Votes

Translate

Translate
LEGEND ,
May 19, 2006 May 19, 2006

Copy link to clipboard

Copied

<cfheader name="content-disposition"
value="attachment;filename=noah_britton_resume.doc">
or
<cfheader name="content-disposition"
value="inline;filename=noah_britton_resume.doc"> to display in browser.
HTH
--
Tim Carley
www.recfusion.com
info@NOSPAMINGrecfusion.com

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 ,
May 19, 2006 May 19, 2006

Copy link to clipboard

Copied

I've implemented the first example you gave on my site but the downloaded file is a copy of my webpage, not my word document. Here is the code

<cfheader name="content-disposition"
value="attachment;filename=noah_britton_resume.doc">

Go to www.datafusionsystems.com to try it out and see for yourself. Thanks for the try though, hope i get this resolved.

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
LEGEND ,
May 19, 2006 May 19, 2006

Copy link to clipboard

Copied

add that to your cfif statement along with the cfcontent tag
you have to use both.
hth
--
Tim Carley
www.recfusion.com
info@NOSPAMINGrecfusion.com

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
Community Expert ,
May 20, 2006 May 20, 2006

Copy link to clipboard

Copied

You should use both tags, cfcontent and cfheader. It is also a good idea to check beforehand whether the file exists.

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 ,
May 20, 2006 May 20, 2006

Copy link to clipboard

Copied

LATEST
Ah I get it, thanks. It works beautifully now!

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