Forum OpenACS Q&A: Limiting file upload size from aolserver

Hello, all!

I want to limit the upload file size for avoid
that the users can upload very big files.

I know that I can limit that from OpenACS but
I want to limit at AOLserver level. I would like
abort one upload connection if that is bigger
that one parameter.

Any pointer?

I am using AOLserver 4.

Regards,
Agustin

Collapse
Posted by Torben Brosten on

This quote from Vinod on the aolserver listserv might help:

...AOLserver from CVS from the tip of the aolserver_v40_bp branch.. has this change in it:

http://cvs.sourceforge.net/viewcvs.py/aolserver/aolserver/nsd/driver.c?r1=1.17&r2=1.17.2.1

It basically adds a parameter 'maxinput' inside ns/server/${servername}/module/nssock. The default of this parameter is 1 MB, so uploads above that size silently fail.

Otherwise, you might check at aolserver.com (and post your findings here for others, please.)

cheers,

Torben

Collapse
Posted by Jose Agustin Lopez Bueno on
Hi!

Thanks for the quickly reply.

Ok. I have download nsd.h and  driver.c from cvs
and I have recompilate aolserver 4.

I have put the 'maxinput' parameter in config.tcl:

ns_section ns/server/${server}/module/nssock
ns_param  maxinput          5000000

And works fine!
Uploads bigger than maxinput are killed.

Regards,
Agustin