|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
ColdFusion Header to Serve a File
I have the following code to serve a file for download:Robert Harrison 06/14/12 11:21 A Is your variable a typo? #Get_file# vs. #GetFile# in the cfcontent tag? You typed it up two different ways in the post.Chad Gray 06/14/12 11:43 A Thanks. Issue resolved. The problem was a corrupt test file.Robert Harrison 06/14/12 11:54 A I have the following code to serve a file for download: <cfheader name="Content-Disposition" value="attachment; filename=#attach_file#"> <cfheader name="Content-Length" value="#file_size#"> <cfcontent type="#mime_type#" file="#getfile#"> All the variables are correct. #attach_file# = the name of the file #file_size# = the size of the file in bytes #mime_type# = the correct mime type #get_file# = the full physical path to the file and the file name No matter what I do it does not seem to know where the file is (get_file) is the full drive path and file name. It always tries to download from the web root. What am I missing here? Thanks, 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 Is your variable a typo? #Get_file# vs. #GetFile# in the cfcontent tag? You typed it up two different ways in the post. ----- Excess quoted text cut - see Original Post for more ----- Thanks. Issue resolved. The problem was a corrupt test file. 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 Is your variable a typo? #Get_file# vs. #GetFile# in the cfcontent tag? You typed it up two different ways in the post. ----- Excess quoted text cut - see Original Post for more -----
|
May 26, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||