I digged a bit deeper into the upload component. And thankfull it seems to
be possible by contributing to ApplicationDefaults. For example:

public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration)
{
        // Contributions to ApplicationDefaults will override any
contributions to
        // FactoryDefaults (with the same key).

        ....

-->        configuration.add(UploadSymbols.REQUESTSIZE_MAX, "1000000");
-->        configuration.add(UploadSymbols.FILESIZE_MAX, "500000");
}

Anyways many thanks for the answer.

Regards,
Otho

2008/2/27 Howard Lewis Ship <[EMAIL PROTECTED]>:

> Not that I know of; it's not something you can do on the client side.
> There is some configuration on the server side, but that may be too
> late for you.
>
> On Mon, Feb 25, 2008 at 11:11 AM, Otho <[EMAIL PROTECTED]> wrote:
> > Is there a way to restrict the size of uploaded files in the upload
> >  component?
> >
> >  In a community app with avatar upload it would be possible for
> malicious
> >  users to hog the application by uploading very large images to provoke
> out
> >  of memory errors. Is there any way to configure upload to only accept
> files
> >  up to a certain size?
> >
> >  Regards,
> >  Otho
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to