I'll give the cftry method a go this morning and see how it works. thanks
-----Original Message----- From: Ewok [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 19, 2003 9:16 PM To: CF-Talk Subject: Re: <cfif does not contain> for file input This should work just fine..... <cftry> <cffile action="UPLOAD" destination="C:\Inetpub\wwwroot\GLABNEW\projectsnew" nameconflict="overwrite" filefield="filea" accept="image/gif,image/pjpeg,image/jpg,image/jpeg"> <cfcatch> <cflocation url="gaddproject.cfm?error=yes"> </cfcatch> </cftry> but if you instist on your <cfif > method try..... <cfif NOT findnocase(".gif", Form.filea) AND NOT findnocase(".jpg", Form.filea)> or <cfif right(Form.filea, 3) NEQ "gif" AND right(Form.filea, 3) NEQ "jpg"> or <cfif listlast(form.filea, ".") NEQ "gif" AND listlast(form.filea, ".") NEQ "jpg"> ...sorry, got carried away heh ----- Original Message ----- From: "Jeremy Bunton" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, January 16, 2003 9:45 AM Subject: <cfif does not contain> for file input > Hello, > > I am trying to do something like bleow before I do a file upload to check > for an extension and it always hits the cflocation. Makes me think maybe the > file feild is not being read properly. If I take the <cfif> out it uploads > fine. > > > <cfif Form.filea does not contain ".gif" and Form.filea does not contain > ".jpg" and Form.filea does not contain ".jpeg"> > <cflocation url="gaddproject.cfm?error=yes"> > <cfelse> > <cffile action="UPLOAD" destination="C:\Inetpub\wwwroot\GLABNEW\projectsnew" > nameconflict="overwrite" filefield="filea"> > > > </cfif> > > I also tried the accept="image/gif,image/jpg, image/jpeg" in the <cffile> > but for some reason it would throw an error on jpeg uploads, so i fugured > the above would work. > > > Jeremy > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

