>Im working on a tag to wrap around content and then save it to a file, gzip >it and serve it out. Expanding on the cf_GZipPage custom tag. > >But trying to take is a step further. I would like to save the gzip'd binary >data in the db. Main reason is the expected amount of gzipped files could be >well over 100k. I would prefer to not let the file system handle finding and >reading the data.
The following is untried but should work... I'm assuming you have a name field in your table that can be supplied as a suggested filename to the user. <cfquery name="foo" datasource=#dsn#> SELECT name, content FROM table WHERE id=#id# </cfquery> <cfif foo.recordcout gt 0> <cfheader name="Content-disposition" value="filename=#foo.name#.gz"> <cfcontent type="application/x-gzip" reset=true> <cfoutput>#foo.content#</cfoutput> <cfelse> <!--- barf ---> </cfif> Pete Jordan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195547 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

