> I've written an application where the user can store Office 2007 attachments > in an Oracle table. When requesting the > attachment, I have a CFM template (displayAttachment.cfm) that retrieves and > serves up the attachment from the table. > The app works fine except for a minor glitch. IE sees the mime type and > tries to process, e.g., displayAttachment.xlsx > (in the case of XLSX files) which is fine. But, FireFox sees > displayAttachment.cfm and tries to open that when "Open" > is selected on the "Open..." dialog box. In my case, it opens the attachment > content in Dreamweaver. Who knows what > it tries to use on users' machines. Is there a way of altering the headers > to say that displayAttachment.extensionOfAttachment > is coming instead of displayAttachment.cfm so the proper application launches?
You can use the Content-Disposition header: <cfheader name="Content-Disposition" value="inline; filename=#yourFileName#"> or <cfheader name="Content-Disposition" value="attachment; filename=#yourFileName#"> Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or o ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345758 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

