Thanks Dave.

JM

-----Original Message-----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 24/08/00 10:52 AM
Subject: RE: Yet another filesize question

> I know there has been a lot of talk about this subject
> lately, but none of the threads directly answered my question.
> I know that I can determine a file's size AFTER it has been
> uploaded, but I would like to prevent someone from uploading
> a 100MB file, and then have to delete it after it has bogged
> down the server.
>
> Once I have selected a file to upload with a FILE input, can
> I determine the value of the path to the selected file in order
> to do a CFDIRECTORY on the path and determine the size, thus
> preventing the upload all together? Maybe with Perl or JavaScript?

You can't determine the size of the file before it has been uploaded,
unless
you're going to install some special software on the client (ActiveX or
Java
components, perhaps) which would do this for you. If you're using a
regular
file upload form, though, there's no way to do this. CFDIRECTORY, like
other
CFML tags, executes on the server, allowing you to manipulate the
filesystem
on the server, not the client.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.

Reply via email to