Yes, you are right. Both use flash for the upload (You can right-click on
"Attach a file" to check that).
Unfortunately, native browser support for uploading files is not as flexible
as one would like.

If you are unable to use flash, i would recommend your servlet which will
receive the file to trown a exception or validation error (depending on your
implementation) when the bytes of the stream reached the maximum size.

Regards

--
Guilherme Petterle Silveira Mussi

Conrad Caine Media Applications GmbH

Mobile: +55 53 91257012
Office: +55 53 30275721

"Any fool can know. The point is to understand." - Albert Einstein


On Wed, May 5, 2010 at 9:17 AM, mmoossen <[email protected]> wrote:

> i am also interested in a way to do that...
>
> there has to be a way, since gmail as well as youtube both check the
> file size limit before uploading...
> but most likely it is flash :(
>
> regards
> Michael
>
> On May 5, 1:38 pm, abhiram wuntakal <[email protected]> wrote:
> > Hey Ankit,
> >
> >   AFAIK, you wont get to know the size of the file unless you transfer it
> to
> > the server. But from the client side you can restrict the file extension
> by
> > extracting the file name as follows :
> >
> >     final FileUpload upload = new FileUpload();
> >         upload.setName("uploadFormElement");
> >         absolutePanel.add(upload,8,37);
> >         String fileNameVal = upload.getFilename();
> >
> >   You can put appropriate check to ensure that certain kind of files
> alone
> > can be uploaded.
> >
> >   HTH,
> >
> > Regards,
> > Abhi
> >
> >
> >
> > On Wed, May 5, 2010 at 2:04 PM, GWT Groups <[email protected]>
> wrote:
> > > Hello Friends
> >
> > > I am back to ask a question, Friends I want some views from your side
> > > about that
> > > "How to prevent the big and specific file to be uploaded?"
> >
> > > I want that prevent the pdf file to be uploaded.
> >
> > > I don't know how to do it?
> >
> > > Please help me
> >
> > > Your friends
> > > Ankit
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-web-toolkit%[email protected]>
> <google-web-toolkit%[email protected]<google-web-toolkit%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> > To post to this group, send email to [email protected]
> .
> > To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to