Hi all,

Re: CFCONTENT, MIME types, filenames, browsers

You have to deal with BOTH browsers. IE tends to ignore MIME types and look
at the file extension, so you have to use a trick.  Basically, you just tack
a fake filename onto the end of your URL, like so:
http://servername/cfdocs/index.cfm/xyz.doc?fuseaction=showWordDoc
(this is a FuseBox exaample, but it works for non-FuseBox as well)
As you see, any URL parameters get added AFTER the fake filename.

Now index.cfm (fuseaction=showWordDoc) gets invokded on the server, and has
to build the doc on the fly.  You then use CFCONTENT to specify the MIME
type, application/msword (for Netscape's benefit).  The /xyz.doc tacked onto
the URL fools both browsers about the filename, and IE looks at the .doc
extension to figure out how to display the file.

That's the basic technique.  Let me know if anyone needs more detail.

Best of luck,
Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork




------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to