"Lon Lentz" <[EMAIL PROTECTED]> wrote in message
>   Is there a way to check the size of a file before the server
> CFFile-Uploads it?

Something like this should help you getting started:

<cfif isDefined("form.photo")>
 <cfset tmtFileSize="50000">
 <cfif Val(cgi.content_length) GT tmtFileSize>
  <cfscript>
  WriteOutPut("The selected file's size is greater than the " &
#tmtFileSize# & "bytes maximun size allowed, please select another one and
try again.");
  </cfscript>
  <cfabort>
 </cfif>
 <cffile action="upload" filefield="photo"
destination="#ExpandPath("../myfolder")#" nameconflict="makeunique"
accept="image/*">
</cfif>


--
----------------------------
Massimo Foti
[EMAIL PROTECTED]

http://www.massimocorner.com
Dreamweaver, Ultradev and Fireworks goodies

http://www.projectseven.com/viewer/snippets.htm
Snippets Panel
----------------------------


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to