The two that spring immediately to my mind are .txt and, as a last resort, .zip (containing the file). Would either of those work for you...? On Nov 16, 2011 6:35 PM, "Justin Scott" <[email protected]> wrote:
> > Hopefully someone has had more experience with this than I have and > can point me in the right direction. One of the web apps I'm working > on will generate a file which will store an encryption key, and we > hand it off to the web browser for the user to save on their computer. > > The code we're using to generate the file is: > > <cfcontent type="application/binary" reset="true" /> > <cfheader name="Content-Disposition" value="attachment; > filename=""Data-Encryption-Key.key"";" /> > <cfoutput>#variables.theKeyData#</cfoutput> > <cfabort /> > > The system generates the file okay, but when the web browser goes to > prompt the user we're running into all sorts of issues. We started > off with a generic ".dat" extension and one test computer had some > video player which insisted on opening and handling the file. The new > ".key" extension seems to work okay on PC's, but Macs with KeyNote > installed insist on handing the file over to KeyNote which, of course, > doesn't know what to do with it and throws an error. > > Is there some different combination of headers we can use to > consistently get the web browser to just prompt the user where to save > the file rather than passing it off to God-only-knows-what programs > they might have on their computer? Unfortunately the target audience > for the application will likely have fairly non-technical people going > through the process and they will likely just click the default option > that comes up which we'd like to be "save" in all cases. Any > thoughts? > > > -Justin Scott > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:348762 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

