House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

CFHeader Problem

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robert Harrison
06/26/2012 10:51 AM

What's wrong with the below?   <cfheader name="Content-Disposition" value="attachment; filename=myfile.zip">   <cfcontent type="application/zip" file="d:\inetpub\wwwroot\thedirectory\myfile.zip "> The file is there and the path is correct. I can download the file directly by typing in http://mysite.com/thedirectory/myfile.zip in the browser, but whenever I try to use CFHEADER to serve the files it just spins (even though it's in a CFTRY it does not thrown an error). When I abort (exit the spinning page) I get a diagnostic dump:   Java heap space null   The error occurred on line -1. What the heck? I I doing something wrong? Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct   125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788 T 631.231.6600 X 119   F 631.434.7022   http://www.austin-williams.com Blog:      http://www.austin-williams.com/blog Twitter:  http://www.twitter.com/austin_wi

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
06/26/2012 11:04 AM

>>What's wrong with the below? Don't you need  RESET="yes" inside the CFCONTENT tag?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robert Harrison
06/26/2012 11:08 AM

According to the documentation the default is "yes". Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct   125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788 T 631.231.6600 X 119   F 631.434.7022   http://www.austin-williams.com Blog:      http://www.austin-williams.com/blog Twitter:  http://www.twitter.com/austin_williams >>What's wrong with the below? Don't you need  RESET="yes" inside the CFCONTENT tag?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bobby
06/26/2012 10:27 PM

Which CF Version? What is the file size of myfile.zip? And how much memory is allocated to CF? On 6/26/12 11:08 AM, "Robert Harrison" <robert@austin-williams.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bobby
06/26/2012 10:32 PM

Sorry. I didn't realize it was solved. It would help to not change the subject of the thread ;-) On 6/26/12 10:26 PM, "Bobby" <bobby@acoderslife.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
06/26/2012 10:27 PM

----- Excess quoted text cut - see Original Post for more ----- I realize your question has already been answered - and for the record, I like Ben Nadel's solution to this very much - but I have a related question for you. If you're serving files in your web root, why are you bothering to use CFCONTENT to serve them? Just serve a link to the file in question, and let the web server do the work. If there's some business reason why you don't want to do that, you probably shouldn't store the files in a web-accessible directory. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, on

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robert Harrison
06/27/2012 02:18 PM

> but I have a related question for you. If you're serving files in your web root, why are you bothering to use CFCONTENT to serve them? This of that example as "foo".  It's for illustration only :-) Robert Harrison Director of Interactive Services Austin & Williams Advertising I Branding I Digital I Direct   125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788 T 631.231.6600 X 119   F 631.434.7022   http://www.austin-williams.com Blog:      http://www.austin-williams.com/blog Twitter:  http://www.twitter.com/austin_williams ----- Excess quoted text cut - see Original Post for more ----- I realize your question has already been answered - and for the record, I like Ben Nadel's solution to this very much - but I have a related question for you. If you're serving files in your web root, why are you bothering to use CFCONTENT to serve them? Just serve a link to the file in question, and let the web server do the work. If there's some business reason why you don't want to do that, you probably shouldn't store the files in a web-accessible directory. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, on


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 22, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference