When I want to force download of a particluar kind of file, I add/change
the mime type in the webserver, then just cflocate to the file.
For example. For the files on www.digitacamera.com (.csm files), my
mime.types files includes:
type=text/digitascript exts=csm
Since that's unknown to the browser, it prompts for download...
> I have a link where a user can download a PowerPoint file. The link goes to
> this page (basically) ...
>
> <cfheader name="Content-Disposition" value="attachment;
> filename=ppFile_Name.ppt">
>
> <cfcontent type="application/unknown" file="c:\inetpub
> wwwroot\ppFiles\ppFile_Name.ppt">
>
> When I click the link I get the File Download dialog box but it wants to
> download the cfm template that called this template (the page with the
> link). It also tries to download the page as a .html file instead of .cfm.
>
> If I call the page with a target="_blank" in the link it downloads the ppt
> fine, but them I'm stuck with a browser window open with an error, "The page
> cannot be displayed".
>
> Any suggestions?
>
> Thanks,
> Tim Bahlke
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists