You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <P....@albourne.com> on 2008/07/08 11:02:06 UTC
Tapestry-upload component limit uploaded data
Hi
I wish to limit the types of files that are handled by the upload component (i.e: only excel and pdf files), but I can't seem to find this documented... I also tried it using the HTML parameter accept="application/excel, application/vnd.ms-excel, application/x-msexcel, application/ms-excel, application/pdf", but it still uploads everything. Sorry if this question is trivial, but I could use some pointers please.
Thanks
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry-upload component limit uploaded data
Posted by Ulrich Stärk <ul...@spielviel.de>.
Or you could just use the regexp validator and filter on file names. See
http://tapestry.apache.org/tapestry5/tutorial1/forms.html for an example
how to use it.
Uli
Am Di, 8.07.2008, 11:11, schrieb Ulrich Stärk:
> You can write an org.apache.tapestry5.FieldValidator and bind it to your
> upload component with the validate parameter.
>
> Uli
>
> Am Di, 8.07.2008, 11:02, schrieb Peter Stavrinides:
>> Hi
>>
>> I wish to limit the types of files that are handled by the upload
>> component (i.e: only excel and pdf files), but I can't seem to find this
>> documented... I also tried it using the HTML parameter
>> accept="application/excel, application/vnd.ms-excel,
>> application/x-msexcel, application/ms-excel, application/pdf", but it
>> still uploads everything. Sorry if this question is trivial, but I could
>> use some pointers please.
>>
>> Thanks
>> Peter
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry-upload component limit uploaded data
Posted by Ulrich Stärk <ul...@spielviel.de>.
You can write an org.apache.tapestry5.FieldValidator and bind it to your
upload component with the validate parameter.
Uli
Am Di, 8.07.2008, 11:02, schrieb Peter Stavrinides:
> Hi
>
> I wish to limit the types of files that are handled by the upload
> component (i.e: only excel and pdf files), but I can't seem to find this
> documented... I also tried it using the HTML parameter
> accept="application/excel, application/vnd.ms-excel,
> application/x-msexcel, application/ms-excel, application/pdf", but it
> still uploads everything. Sorry if this question is trivial, but I could
> use some pointers please.
>
> Thanks
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org