Image upload

68 views
Skip to first unread message

Deepak Singh

unread,
Nov 12, 2011, 10:32:07 AM11/12/11
to google-we...@googlegroups.com, google-a...@googlegroups.com

Hi,

I need to upload an image to GAE server and store it in datastore.
I looked for many options and found that FileUpload widget released with GWT 2.4 can do it but the restriction is that this widget must be used with FormPanel.
but i dont want to use formPanel.

Can anyone suggest me the best possible way w.r.t GWT + GAE

I am using GWT 2.4, GAE 1.5.5

Thanks
Deepak Singh

Adrian Scott

unread,
Nov 12, 2011, 10:45:11 AM11/12/11
to google-a...@googlegroups.com
We have sample code for uploading an image in our open-source adrianremembersme-django project (though this is not using GWT).

To use the latest version of it, just create a project on CoderBuddy using the Starting Content options of "Guestbook App - Adrian Remembers Me - Django" or ""Adrian Remembers Me - Django". The upload image code is used to store a person's profile photo. You can customize from there.  (After you create your first project, you'll have these Starting Content options in the second project.)

Hope this helps -- enjoy,
-A

--
Adrian Scott, Ph.D.
CEO, Founder
CoderBuddy
http://www.coderbuddy.com/ <-- Create a Facebook or Google App Engine app in a minute without installing anything


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.



Ernesto Oltra

unread,
Nov 12, 2011, 5:50:21 PM11/12/11
to google-a...@googlegroups.com, google-we...@googlegroups.com
GWT is compiled to JavaScript: it can't do what JavaScript can't either. The trick of FileUpload is sending the form (and the file) in a hidden iframe; that way you haven't to reload the whole page. There is a good reason not to use FormPanel?

Ikai has a blog post with some sample code using GWT to upload images to appengine:
and the demo:
Reply all
Reply to author
Forward
0 new messages