You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hi,
What is the best approach to upload a file?
1. Is it mandatory to submit the form? How should i implement the Remote Service in this case?
2. Can i upload the file with an asynchronous call? What should be the input parameters to the Remote service method in this case?
Can anybody help me with some sample code?
Thanks
Sreekanth
Jim Douglas
unread,
Nov 27, 2010, 3:03:50 PM11/27/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Yes, you must submit the form to upload a file (or files), and the
file(s) must be selected by direct action of the user. The basic
structure is:
On the client side, a GWT FormPanel containing a FileUpload widget
(and optionally other information, e.g. one or more Hidden fields
containing information that will be meaningful to your servlet).
Using those helper functions in that package, the doPost method in
your FileUploadServlet class becomes straightforward. Just choose
from one of these examples: