Looks like you're the victim of scenario #2 in this KB article: http://kb2.adobe.com/cps/181/tn_18171.html
On Thu, Jun 30, 2011 at 6:57 PM, Jenny Gavin-Wear < [email protected]> wrote: > > Thanks Michael, > > I looked for the dump first. > > The only problem is the session variable not being set inside the cfcatch. > > I'm sure I am catching the error for the cflocation to trigger. > > Jenny > > > >>-----Original Message----- > >>From: Michael Grant [mailto:[email protected]] > >>Sent: 01 July 2011 00:04 > >>To: cf-talk > >>Subject: Re: CFFILE / CFCATCH > >> > >> > >> > >>+1. > >><cfdump var="#cfcatch#"/> > >><cfabort /> > >> > >>Also, you can drop the extraneous cfoutput around the cffile. > >>Variables are automatically outputted if used as an attribute > >>value in a cftag and wrapped in #. > >> > >>Sent from my iPhone. > >> > >> > >>On 2011-06-30, at 2:56 AM, "Andrew Scott" <[email protected]> > wrote: > >> > >>> > >>> Jenny, I am going to assume that you have tried to cfdump and > >>abort in the > >>> cfcatch to see what the message contains. Failing that I do > >>know that some > >>> of these messages have hidden characters and will not match > >>even if you try. > >>> > >>> I don't have the link handy at the moment, but I did write a > >>blog about this > >>> sort of thing some months ago. > >>> > >>> > >>> Regards, > >>> Andrew Scott > >>> http://www.andyscott.id.au/ > >>> > >>> > >>> > >>>> -----Original Message----- > >>>> From: Jenny Gavin-Wear [mailto:[email protected]] > >>>> Sent: Thursday, 30 June 2011 2:20 PM > >>>> To: cf-talk > >>>> Subject: CFFILE / CFCATCH > >>>> > >>>> > >>>> 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:346018 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

