Click to See Complete Forum and Search --> : upload file - limit size


esthera
10-11-2004, 12:57 AM
I use pure asp upload to upload files.
Is it possible to limit weight, and dimentions?

buntine
10-11-2004, 01:43 AM
You can use the setMaxSize function. Note, the integer passed to this function is the size in bytes.

Set objUpload = Server.CreateObject("Persits.Upload")
Upload.SetMaxSize 100000, True '| Limit file size to 100000 bytes.

Most ASPUpload questions can be answered at their web site: www.aspupload.com

Regards.

esthera
10-11-2004, 01:54 AM
I'm not using asp upload.
I am using pure asp upload from website http://www.motobit.com/help/scptutl/upload.asp

buntine
10-11-2004, 02:59 AM
Use the SizeLimit property.

Dim objUpload
Set objUpload = Server.CreateObject("ScriptUtils.ASPForm")
objUpload.SizeLimit = &H100000 '| 1MB max.

Regards.

esthera
10-12-2004, 05:37 AM
thanks what values can I put in size limit?
Will this give a clear error to the user if it is above size.
What I need to do is alert the user if the size is more than what I allow.

Also is there anyway to limit the dimentions? I would like to do the same with dimentions.