This is what we use to push out our project, data and image files.  It is
with Oracle 10g(I think, maybe 9i).  Works with IE and Firefox(both on
Windows and Linux).  I suppose you could store the mime types so that you
could do the actual mime type instead of type unknown.

<cfparam name="URL.LOB_ID" default="0" type="numeric" />

<cfquery name="qryGetLob" datasource="#App.DataSource#">
SELECT BLOBDATA, SOURCE_PATH
FROM LOB_TABLE
WHERE LOB_ID = <cfqueryparam value="#URL.LOB_ID#" cfsqltype="cf_sql_numeric"
/>
</cfquery>
<cfif qryGetLob.RecordCount IS NOT 0>
<cfheader name='Content-Disposition'
value='attachment;filename=#ListLast(qryGetLob.SOURCE_PATH, "\/")#'>

<cfcontent type="application/unknown" variable="#qryGetLob.BLOBDATA#">
</cfif>

On Thu, Jul 22, 2010 at 1:00 PM, Mark Davis <[email protected]> wrote:

> I have some file attachments that I am reading and storing in a table (as a
> BLOB datatype.  Having trouble  determining the process of reading the BLOB
> back out and displaying the file to the user.  The files can be just about
> any type (doc, xls, some type of image, you name it).  Anyone wanna save me
> a headache?
>
> Thanks
>
> Mark
>
> --
> You received this message because you are subscribed to the "Houston
> ColdFusion Users' Group" discussion list.
> To unsubscribe, send email to [email protected]
> For more options, visit http://groups.google.com/group/houcfug?hl=en




-- 
Aaron Rouse
http://www.happyhacker.com/

-- 
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to [email protected]
For more options, visit http://groups.google.com/group/houcfug?hl=en

Reply via email to