macromedia.coldfusion.database_access
[Top] [All Lists]

Re: Downloading files from IMAGE datatype on SQL Server, old coldfusion

Subject: Re: Downloading files from IMAGE datatype on SQL Server, old coldfusion runtime
From: "-==cfSearching==-" <webforumsuser@xxxxxxxxxxxxxx>
Date: Sat, 23 Feb 2008 22:52:57 +0000 (UTC)
Newsgroups: macromedia.coldfusion.database_access

I [i]think[/i] 4.5 allows you try write a blob to a file via cffile write.  So 
try grabbing the blob field in a query, and write it to the file system with 
cffile.  You will probably need to implement a unique file naming system to 
avoid conflicts.

 Then try using cfcontent and cfheader to force a download.  

 <cfheader name="Content-Disposition" value="attachment; 
filename=whateverNameYouWant.pdf">
 <cfcontent type="application/pdf" file="(Full path to file here)">

 Check the documentation.  Does cfcontent have a deleteFile attribute? If it 
does you can use it to delete the file after it is downloaded.  


<Prev in Thread] Current Thread [Next in Thread>