473,396 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

cfheader: file not found

113 100+
Hi there,

I've been trying to implement a csv file download with the following code:

Expand|Select|Wrap|Line Numbers
  1.       <cfheader name="Content-Disposition" value="attachment;filename=thefile.csv">
  2.       <cfcontent type="application/csv" deleteFile="No" file="theFile.csv">
  3.       <!--- Data ouput code goes here --->
  4.       </cfcontent>
  5.  
But a page load error occurs stating the file cannot be found? When I change the cfheader value to inline;filename=theFile.csv the file displays but doesn't prompt for a download? Could someone point out where I am going wrong please?

Thanks,

Chromis
Sep 8 '08 #1
3 4598
chromis
113 100+
Expand|Select|Wrap|Line Numbers
  1.       <cfheader name="Content-Disposition" value="attachment;filename=thefile.csv">
  2.       <cfcontent type="application/csv" deleteFile="No" file="theFile.csv">
  3.       <!--- Data ouput code goes here --->
  4.       </cfcontent>
  5.  
The answer was in the file attribute of the cfcontent tag. The new code is as follows:

Expand|Select|Wrap|Line Numbers
  1.       <cfheader name="Content-Disposition" value="attachment;filename=thefile.csv">
  2.       <cfcontent type="application/csv">
  3.       <!--- Data ouput code goes here --->
  4.       </cfcontent>
  5.  
Sep 8 '08 #2
acoder
16,027 Expert Mod 8TB
If you're specifying a file attribute for cfcontent, it needs to be the full path.
Sep 8 '08 #3
chromis
113 100+
Thanks acoder I'll remember that.
Sep 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Richard | last post by:
Hi, Can anyone tell me what the difference is between for line in file.readlines( ): and for line in file:
3
by: Abhas | last post by:
> > Hi, this is Abhas, > > I had made a video library program in C++, but was facing a problem. > > After entering 12 movies, i cannot enter any more movies. > > Something gibberish comes instead....
7
by: spike | last post by:
Im writing a program to search for a string in a binary file. And it works. The problem is: It is sooo slow! how can i make it faster? It takes 27 seconds just to search a 5 meg file. I guess it...
2
by: Profetas | last post by:
I have the following code that detects a <c> and </c> #include <stdio.h> main(int argc, char *argv) { FILE* fp; char data;
3
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a...
2
by: aallee83 | last post by:
i'm new in asp.net after develop my solution i copied it on the server where I want it to run but something cares... WHAT?!?! thank you in advance File or assembly name System, or one of its...
1
by: Christian Rühl | last post by:
hey! what i wanna do sounds very simple at first, but it turned out to be a real bone crusher... i want to check if a treeView node is checked and if a correspondent node in my xml config file...
1
by: Christian Rühl | last post by:
hey! what i wanna do sounds very simple at first, but it turned out to be a real bone crusher... i want to check if a treeView node is checked and if a correspondent node in my xml config file...
24
by: Bill | last post by:
Hello, I'm trying to output buffer content to a file. I either get an access violation error, or crazy looking output in the file depending on which method I use to write the file. Can anyone...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.