Well, you cannot check the file size of the document with CF prior to uploading it, 
but there may be some java applets out there that can do this.  The problem is that 
until the file gets to the server, the server has no idea how large it is.

Once it's uploaded though, you can use the CFFILE variable "FileSize" to determine 
it's size and then use some conditional logic to do whatever.

Check the docs:

/cfdocs/Developing_Web_Applications_with_ColdFusion/15_Managing_Files_on_the_Server/dwa15_4.htm

---mark


--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------


> -----Original Message-----
> From: Ben Montanelli [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 05, 2000 2:47 PM
> To: CF-Talk
> Subject: RE: maxlength on text area
> 
> 
> Do you know of a similar routine that would evaluate the size of 
> a document
> uploaded in the CFFILE tag through the Form filefield other than the File
> Upload Filesize parameter?
> 
> -Ben M.
> 
> At 10:53 AM 10/5/00 -0700, you wrote:
> >I don't think so, but if you're concerned about the user entering in too
> much data into a memo field (which I why I think your asking), 
> then you can
> use the following error checking code to prevent an overflow.
> >
> ><cfif Len(form.TEXTAREA_field) gt 16380>
> >
> >     
> ></cfif>
> >
> >--------------------------------------------------------------
> >Mark Warrick
> >Phone: (714) 547-5386
> >Efax.com Fax: (801) 730-7289
> >Personal Email: [EMAIL PROTECTED]
> >Personal URL: http://www.warrick.net 
> >Business Email: [EMAIL PROTECTED]
> >Business URL: http://www.fusioneers.com
> >ICQ: 346566
> >--------------------------------------------------------------
> >
> >
> >> -----Original Message-----
> >> From: Robert Everland [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, October 02, 2000 10:49 AM
> >> To: CF-Talk
> >> Cc: '[EMAIL PROTECTED]'
> >> Subject: maxlength on text area
> >> 
> >> 
> >> Is there a way to set a maxlength on a textarea using javascript or any
> >> other method.
> >> 
> >> Robert Everland III
> >> Web Developer
> >> Dixon Ticonderoga
> >> ------------------------------------------------------------------
> >> ------------
> >> Archives: http://www.mail-archive.com/[email protected]/
> >> To Unsubscribe visit 
> >> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> >> _talk or send a message to [EMAIL PROTECTED] with 
> >> 'unsubscribe' in the body.
> >
> >-----------------------------------------------------------------
> ----------
> ---
> >Archives: http://www.mail-archive.com/[email protected]/
> >To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebarsts&bodysts/cf_talk 
> or send a
> message to [EMAIL PROTECTED] with 'unsubscribe' 
> in the body.
> >
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to