Try to use the following code
Code:
<cfif Right(filename,3) EQ ",mp3" or Right(filename,3) EQ "avi">
<cfheader name="Content-Disposition" value="attachment; filename=#downloadFilename#">
<cfelse>
<cfheader name="Content-Disposition" value="inline; filename=#downloadFilename#">
</cfif>
<cfswitch expression="#Right(filename,3)#">
<cfcase value="ai"><cfset MIME = "application/postscript"></cfcase>
<cfcase value="aif"><cfset MIME = "audio/x-aiff"></cfcase>
<cfcase value="aifc"><cfset MIME = "audio/x-aiff"></cfcase>
<cfcase value="aiff"><cfset MIME = "audio/x-aiff"></cfcase>
<cfcase value="asc"><cfset MIME = "text/plain"></cfcase>
Bookmarks