You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michal Stochmialek <mi...@e-informatyka.pl> on 2004/06/29 13:12:24 UTC

max upload size, how to validate?

Hello,

Can you tell me how to validate uploaded file (using woody/cocoon 2.1.5)? 

I've set upload-max-size in configuration, but when user uploads file
which exceeds this limit IOException is thrown. It isn't even  handled
by handle-error block in sitemap, so I could show some meanful message.
It's handled by notifing generator...

Woody validator would be the best solution... Or something like accept
attribute for content type...

is there any elegant (usability!) way to deal with this problem?

regards,
-- 
Michal Stochmialek <mi...@e-informatyka.pl>

Re: max upload size, how to validate?

Posted by Michal Stochmialek <mi...@e-informatyka.pl>.
On Tue, Jun 29, 2004 at 04:35:05PM +0200, Sylvain Wallez wrote:

> >Can you tell me how to validate uploaded file (using woody/cocoon 2.1.5)? 
> >
> >I've set upload-max-size in configuration, but when user uploads file
> >which exceeds this limit IOException is thrown. It isn't even  handled
> >by handle-error block in sitemap, so I could show some meanful message.
> >It's handled by notifing generator...
> >
> >Woody validator would be the best solution... Or something like accept
> >attribute for content type...
> > 
> >
> 
> You can specify a list of acceptable mime-types on the upload widget. 
> But the upload size is handled directly by CocoonServlet, i.e. before we 
> enter the sitemap. So there's currently no way to catch excessively 
> large uploads in a clean way.

:/ ... any way, thanks, regards,
-- 
Michal Stochmialek <mi...@e-informatyka.pl>

Re: max upload size, how to validate?

Posted by Sylvain Wallez <sy...@apache.org>.
Michal Stochmialek wrote:

>Hello,
>
>Can you tell me how to validate uploaded file (using woody/cocoon 2.1.5)? 
>
>I've set upload-max-size in configuration, but when user uploads file
>which exceeds this limit IOException is thrown. It isn't even  handled
>by handle-error block in sitemap, so I could show some meanful message.
>It's handled by notifing generator...
>
>Woody validator would be the best solution... Or something like accept
>attribute for content type...
>  
>

You can specify a list of acceptable mime-types on the upload widget. 
But the upload size is handled directly by CocoonServlet, i.e. before we 
enter the sitemap. So there's currently no way to catch excessively 
large uploads in a clean way.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }