You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vincent <vi...@gmail.com> on 2006/02/28 04:16:53 UTC
File upload with extension limit
e.g. I only like to choose all the file end with .jpg , the other
format will be ignored.
How can I archive this?
Re: ERROR java.lang.StackOverflowError ???????????????????? HELP
ME
Posted by Raul Raja Martinez <do...@estudiowebs.com>.
It looks like you have and endless recursive call or loop in your code
Dwi Ardi Irawan wrote:
> i've got thi error :
> ****************************************************************************
> ****
>
> ERROR java.lang.StackOverflowError
>
> User= BRT
>
>
> ****************************************************************************
> ****
>
> java.lang.StackOverflowError
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
ERROR java.lang.StackOverflowError ???????????????????? HELP ME
Posted by Dwi Ardi Irawan <da...@nwa.iao.co.id>.
i've got thi error :
****************************************************************************
****
ERROR java.lang.StackOverflowError
User= BRT
****************************************************************************
****
java.lang.StackOverflowError
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
ERROR java.lang.StackOverflowError ???????????????????? HELP ME
Posted by Dwi Ardi Irawan <da...@nwa.iao.co.id>.
i've got thi error :
****************************************************************************
****
ERROR java.lang.StackOverflowError
User= BRT
****************************************************************************
****
java.lang.StackOverflowError
----- Original Message -----
From: "Vincent" <vi...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, February 28, 2006 10:16 AM
Subject: File upload with extension limit
> e.g. I only like to choose all the file end with .jpg , the other
> format will be ignored.
> How can I archive this?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: File upload with extension limit
Posted by Vincent <vi...@gmail.com>.
Thanks guys
On 3/6/06, Adam Zimowski <zi...@gmail.com> wrote:
> You can certainly detect extension of the uploaded file (see andyhot's
> post), but as you know any user can forge it by simply renaming a
> file.
>
> In case of graphics though, almost every format includes some form of
> METADATA which you can use with Java imaging API to detect if the
> submitted file is truly a JPEG or PNG or whatever format you want.
>
> I suggest you read up on java.awt.* javadoc.
>
>
> On 3/6/06, Nick Westgate <ni...@key-planning.co.jp> wrote:
> > Hi Andy.
> >
> > Great. It's nice to see those doing the difficult or impossible. ;-)
> > Was this accepted into T4? I look forward to using it one day.
> >
> > Cheers,
> > Nick.
> >
> >
> > andyhot@di.uoa.gr wrote:
> > > However, an "accept" validator, to be used like this:
> > >
> > > <component id="file" type="Upload">
> > > <binding name="file" value="file"/>
> > > <binding name="displayName" value="message:filename"/>
> > > <binding name="validators" value="validators:accept=gif-jpeg-other"/>
> > > </component>
> > >
> > > was described in this list:
> > >
> > > http://article.gmane.org/gmane.comp.java.tapestry.user/26835
> > > http://article.gmane.org/gmane.comp.java.tapestry.user/26841
> > >
> > >>From Nick Westgate <ni...@key-planning.co.jp>:
> > >
> > >
> > >>Hi Vincent.
> > >>
> > >>This has nothing to do with Tapestry.
> > >>
> > >>In general it is difficult or impossible because of browsers.
> > >>Google for it.
> > >>
> > >>E.g.
> > >>http://www.cs.tut.fi/~jkorpela/forms/file.html#filter
> > >>
> > >>Cheers,
> > >>Nick.
> > >>
> > >>
> > >>Vincent wrote:
> > >>
> > >>>Is there any news about this?
> > >>>
> > >>>On 2/28/06, Vincent <vi...@gmail.com> wrote:
> > >>>
> > >>>
> > >>>>e.g. I only like to choose all the file end with .jpg , the other
> > >>>>format will be ignored.
> > >>>>How can I archive this?
> > >>>>
> > >>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >>
> > >>
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
Re: File upload with extension limit
Posted by Adam Zimowski <zi...@gmail.com>.
You can certainly detect extension of the uploaded file (see andyhot's
post), but as you know any user can forge it by simply renaming a
file.
In case of graphics though, almost every format includes some form of
METADATA which you can use with Java imaging API to detect if the
submitted file is truly a JPEG or PNG or whatever format you want.
I suggest you read up on java.awt.* javadoc.
On 3/6/06, Nick Westgate <ni...@key-planning.co.jp> wrote:
> Hi Andy.
>
> Great. It's nice to see those doing the difficult or impossible. ;-)
> Was this accepted into T4? I look forward to using it one day.
>
> Cheers,
> Nick.
>
>
> andyhot@di.uoa.gr wrote:
> > However, an "accept" validator, to be used like this:
> >
> > <component id="file" type="Upload">
> > <binding name="file" value="file"/>
> > <binding name="displayName" value="message:filename"/>
> > <binding name="validators" value="validators:accept=gif-jpeg-other"/>
> > </component>
> >
> > was described in this list:
> >
> > http://article.gmane.org/gmane.comp.java.tapestry.user/26835
> > http://article.gmane.org/gmane.comp.java.tapestry.user/26841
> >
> >>From Nick Westgate <ni...@key-planning.co.jp>:
> >
> >
> >>Hi Vincent.
> >>
> >>This has nothing to do with Tapestry.
> >>
> >>In general it is difficult or impossible because of browsers.
> >>Google for it.
> >>
> >>E.g.
> >>http://www.cs.tut.fi/~jkorpela/forms/file.html#filter
> >>
> >>Cheers,
> >>Nick.
> >>
> >>
> >>Vincent wrote:
> >>
> >>>Is there any news about this?
> >>>
> >>>On 2/28/06, Vincent <vi...@gmail.com> wrote:
> >>>
> >>>
> >>>>e.g. I only like to choose all the file end with .jpg , the other
> >>>>format will be ignored.
> >>>>How can I archive this?
> >>>>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: File upload with extension limit
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hi Andy.
Great. It's nice to see those doing the difficult or impossible. ;-)
Was this accepted into T4? I look forward to using it one day.
Cheers,
Nick.
andyhot@di.uoa.gr wrote:
> However, an "accept" validator, to be used like this:
>
> <component id="file" type="Upload">
> <binding name="file" value="file"/>
> <binding name="displayName" value="message:filename"/>
> <binding name="validators" value="validators:accept=gif-jpeg-other"/>
> </component>
>
> was described in this list:
>
> http://article.gmane.org/gmane.comp.java.tapestry.user/26835
> http://article.gmane.org/gmane.comp.java.tapestry.user/26841
>
>>>From Nick Westgate <ni...@key-planning.co.jp>:
>
>
>>Hi Vincent.
>>
>>This has nothing to do with Tapestry.
>>
>>In general it is difficult or impossible because of browsers.
>>Google for it.
>>
>>E.g.
>>http://www.cs.tut.fi/~jkorpela/forms/file.html#filter
>>
>>Cheers,
>>Nick.
>>
>>
>>Vincent wrote:
>>
>>>Is there any news about this?
>>>
>>>On 2/28/06, Vincent <vi...@gmail.com> wrote:
>>>
>>>
>>>>e.g. I only like to choose all the file end with .jpg , the other
>>>>format will be ignored.
>>>>How can I archive this?
>>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: File upload with extension limit
Posted by an...@di.uoa.gr.
However, an "accept" validator, to be used like this:
<component id="file" type="Upload">
<binding name="file" value="file"/>
<binding name="displayName" value="message:filename"/>
<binding name="validators" value="validators:accept=gif-jpeg-other"/>
</component>
was described in this list:
http://article.gmane.org/gmane.comp.java.tapestry.user/26835
http://article.gmane.org/gmane.comp.java.tapestry.user/26841
>From Nick Westgate <ni...@key-planning.co.jp>:
> Hi Vincent.
>
> This has nothing to do with Tapestry.
>
> In general it is difficult or impossible because of browsers.
> Google for it.
>
> E.g.
> http://www.cs.tut.fi/~jkorpela/forms/file.html#filter
>
> Cheers,
> Nick.
>
>
> Vincent wrote:
> > Is there any news about this?
> >
> > On 2/28/06, Vincent <vi...@gmail.com> wrote:
> >
> >>e.g. I only like to choose all the file end with .jpg , the other
> >>format will be ignored.
> >>How can I archive this?
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: File upload with extension limit
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hi Vincent.
This has nothing to do with Tapestry.
In general it is difficult or impossible because of browsers.
Google for it.
E.g.
http://www.cs.tut.fi/~jkorpela/forms/file.html#filter
Cheers,
Nick.
Vincent wrote:
> Is there any news about this?
>
> On 2/28/06, Vincent <vi...@gmail.com> wrote:
>
>>e.g. I only like to choose all the file end with .jpg , the other
>>format will be ignored.
>>How can I archive this?
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: File upload with extension limit
Posted by Vincent <vi...@gmail.com>.
Is there any news about this?
On 2/28/06, Vincent <vi...@gmail.com> wrote:
> e.g. I only like to choose all the file end with .jpg , the other
> format will be ignored.
> How can I archive this?
>