You can also do a check to make sure that the file is of the correct
type (image) here.  

<cfif isDefined("form.fileField") and len(trim(form.fileField)) and
(right(form.filefield,3) eq "jpg" or right(form.filefield,3) eq "gif"))

You can do checks for other extensions as well, but that's just an idea.

John

-----Original Message-----
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 1:12 PM
To: CF-Talk
Subject: Re: Image Issue

I would check to make sure someone did not just accidently hit the space
bar in the FileFIeld.

<cfif IsDefined("FORM.FileFIeld") AND Len(Trim(FORM.FileFIeld))>
<!--- process image here --->
</cfif>

On Fri, 25 Jun 2004 10:06:16 -0700, Jordan Michaels
<[EMAIL PROTECTED]> wrote:
>
> Checking the fields length would work as described in the tag below.
> I've always checked to see if the field was empty though. EG:
>
> <CFIF IsDefined("FORM.FileFIeld") AND FORM.FileFIeld NEQ "">
>    <!--- process image here --->
> </CFIF>
>
> HTH,
> Jordan
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to