<!--- 
|| LEGAL ||
$Copyright: Daemon Pty Limited 1995-2003, http://www.daemon.com.au $
$License: Released Under the "Common Public License 1.0", http://www.opensource.org/licenses/cpl.php$ 

|| VERSION CONTROL ||
$Header: /home/cvsuser/cvs/farcry_core/packages/types/_dmFile/display.cfm,v 1.3 2003/09/10 23:46:11 brendan Exp $
$Author: brendan $
$Date: 2003/09/10 23:46:11 $
$Name: b210 $
$Revision: 1.3 $

|| DESCRIPTION || 
$Description: dmFile display method$
$TODO: $

|| DEVELOPER ||
$Developer: Brendan Sisson (brendan@daemon.com.au)$

|| ATTRIBUTES ||
$in: $
$out:$
--->

<cfsetting enablecfoutputonly="Yes">

<cfset extension = listLast(stobj.FILENAME,".")>
<cfswitch expression="#extension#">
	<cfcase value="pdf">
		<cfcontent type="application/pdf" file="#stobj.FILEPATH#\#stobj.FILENAME#" deletefile="No">
	</cfcase>

	<cfcase value="doc">
		<cfcontent type="application/msword" file="#stobj.FILEPATH#\#stobj.FILENAME#" deletefile="No">
	</cfcase>
	
	<cfcase value="xls">
		<cfcontent type="application/msexcel" file="#stobj.FILEPATH#\#stobj.FILENAME#" deletefile="No">
	</cfcase>
	
	<cfcase value="pdf">
		<cfcontent type="application/pdf" file="#stobj.FILEPATH#\#stobj.FILENAME#" deletefile="No">
	</cfcase>
	
	<cfdefaultcase>
		<cflocation url="#application.url.webroot#/download.cfm?DownloadFile=#stobj.objectid#" addtoken="no">
	</cfdefaultcase>
</cfswitch>

<cfsetting enablecfoutputonly="No">