ID:167654
![]() Feb 15 2006, 9:06 am
|
|
As a not-so-hypothetical example, say someone wishes to upload a music file so that others can hear it. Is it possible to check the filesize before it gets sent (so that if it's bigger than a specified size, it'll get rejected)?
|
length(file) will return the byte size of the file.
mob/verb/crudeuploadforexample(o as file) if(length(o)>49999) return |
Artemio wrote:
length(file) will return the byte size of the file. > mob/verb/crudeuploadforexample(o as file) if(length(o)>49999) return Haey...thats a pretty handy piece of info. |
To elaborate a little, the file has to be totally uploaded to get the size on it, afterwards you simply need to check the length() and fdel() the oversized file.
|
Rather, would it be possible to have a few variables from the file sent to the server, such as name, size, etc... rather than uploading the file completely only to find that it's both stuck in the RSC which may be getting oversized and you don't want to use it (mainly for the reason of server limitations on files, such as certain extensions).
|
Nope.
Lummox JR