Hi again Rick, I guess what you really need is something simple like:
<cfset filePath = File.ServerDirectory & "/" & File.ServerFile > <cfset ext = File.ServerFileExt > <cfset mimetype = #getPageContext().getServletContext().getMimeType(filePath)# > <cfswitch expression="#ext#" > <cfcase value="pdf" ><cfset lst_mimetypes = "application/pdf" ></cfcase> <cfcase value="jpg,jpe,jpeg" ><cfset lst_mimetypes = "image/jpeg,image/pjpeg" ></cfcase> <cfdefaultcase><cfset lst_mimetypes = "" ></cfdefaultcase> </cfswitch> <cfif ListFindNoCase(lst_mimetypes,mimetype) > <!--- process ---> <cfelse> <!--- error ---> </cfif> Cheers, Martyn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257951 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4