I'm trying to cfcatch cffile mime type errors.

I can't see where I'm going wrong.

<cftry>
<cfoutput>
<cffile action="upload" attributes="normal"
destination="#session.currentDirectory#"
filefield="form.fileField" nameconflict="overwrite" accept="image/jpeg,
image/jpg, image/pjpeg, image/gif, image/png">
</cfoutput>
<cfcatch type="any">
<cfif isdefined("cfcatch.Message") and findnocase("not accepted",
cfcatch.Message)>
<cfset session.sysmessage = "Please upload images of type: .jpg, .gif or
.png">
<cflocation url="folder-view.cfm">
</cfif>
</cfcatch>
</cftry>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345949
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to