Cfcontent actually allows you to directly put the filename in the tag - no
reason to read the file in binary first.

<cfcontent
file="#PrimaryDrive##GetFolderPath.FOLDER_PATH##GetFileDetails.FILE_NAME#"
type="#GetFileDetails.FILE_MIME#">


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Brent Nicholas
Sent: Thursday, March 16, 2006 11:52 AM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: [CFCDev] OT: Sending Files to Browsers

Firstly - Sorry for sending an OT item to this list. I kinda feel we have a 
good group of experts here, so I'm hoping someone will have some guidance.

The issue:
When users try to download files they work nearly all the time, though today

it seems files that are above 30MB (rough estimate) fail when downloaded. CF

sends the most basic error message: "An error has occurred." That's it, no 
line number, nothing.

We've narrowed it to what we think is the issue but I'm still skeptical if 
it's really the problem, though most likely. This being the size of the 
file, due to using CFFILE action="read".

Now, I'm guessing reading a big file into CF to then send out to the browser

is a bad thing, due to the load on the memory. Does any one have any 
guidance on a better way to send the file to the browser?

Here is the code I use to send the file to the browser, the variable results

are below. The goal is to prevent the user from having access to the path. 
They just get sent the file.

<cffile action="read" 
file="#PrimaryDrive##GetFolderPath.FOLDER_PATH##GetFileDetails.FILE_NAME#" 
variable="FileContent">
<cfheader NAME="Content-disposition" 
VALUE="inline;filename=#GetFileDetails.FILE_NAME#">
<cfcontent type="#GetFileDetails.FILE_MIME#">
<cfoutput>#FileContent#</cfoutput>

CFFILE PATH: D:\ProjectFiles\52070G\CYLINDERBLOCK\cylblockcast130306.zip
CFHEADER VALUE: inline;filename=cylblockcast130306.zip
CFCONTENT TYPE: application/x-zip-compressed

As I said works almost all the time, except on large files. At least that's 
the pattern so far.

Thanks for an help you might be able to offer,

Grasshopper




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to