physi has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I get stuck in figuring out, how I can limit the file upload size within Mason.
I get stuck in figuring out, how I can limit the file upload size within Mason.
I've got the following Mason code :
Like in the documentation of Apache::Request I create a new instance of the magic $r object, and limit this size to 1 byte for testing.<%perl> my $apr = Apache::Request->instance($r,POST_MAX => 1); my $status = $apr->parse; if ($status) { print "Too big"; }else{ print "OK" </%perl>
When I call this mason dokument from within a form and upload a file bigger then 1byte I always get a OK back!?
Sure I can get the filesize of $apr with the methodes $apr->tempname and the stat this.
But as I understand the documentation, there must be a possibility to do this with the parse function.
Can anyone bring some light in my $r->darkness :-)
Thanks
----------------------------------- --the good, the bad and the physi-- -----------------------------------
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Mason upload limit size
by Fletch (Bishop) on Feb 13, 2004 at 03:24 UTC | |
by physi (Friar) on Feb 13, 2004 at 10:06 UTC | |
by Fletch (Bishop) on Feb 13, 2004 at 14:25 UTC | |
by physi (Friar) on Feb 13, 2004 at 23:22 UTC | |
by ph0enix (Friar) on Nov 29, 2004 at 16:10 UTC | |
by Savuud (Initiate) on Apr 06, 2005 at 13:24 UTC |
Back to
Seekers of Perl Wisdom