Blobstore: how to code the form when there is already one

28 views
Skip to first unread message

David Walt

unread,
Jul 3, 2011, 6:34:34 PM7/3/11
to google-a...@googlegroups.com
Hi guys, 

Simple question.
To use the blobstore, Google says that you need to write something like:

<form action="<%= blobstoreService.createUploadUrl("/upload") %>" method="post" enctype="multipart/form-data">
<!-- Stuff here-->
</form>

In my case, I already have a form to add an Item like :
<form  name="addItemForm" action="addItemFormAction.do" method="post">
<!-- Stuff here like name, price, description, etc...-->
</form>

And of course, more than allowing a user to create an Item with name, price, etc...I would like to allow this user to upload a photo, in the same page, with the same Submit button.

Could you help me to do this ?
Thx a lot.

Robert Kluin

unread,
Jul 3, 2011, 11:24:11 PM7/3/11
to google-a...@googlegroups.com

Hi David,
  One solution would be to handle the other fields in your upload handler.

http://code.google.com/appengine/docs/python/blobstore/overview.html#Complete_Sample_App


Robert

On Jul 3, 2011 6:34 PM, "David Walt" <beau...@gmail.com> wrote:

David Walt

unread,
Jul 4, 2011, 8:35:51 PM7/4/11
to Google App Engine
Could you give me more details or a Java example please?
Not sure to understand how to do.
Note: my projet already contains several forms.

Thx!

On 3 juil, 23:24, Robert Kluin <robert.kl...@gmail.com> wrote:
> Hi David,
>   One solution would be to handle the other fields in your upload handler.
>
> http://code.google.com/appengine/docs/python/blobstore/overview.html#...
>
> Robert
> On Jul 3, 2011 6:34 PM, "David Walt" <beaucr...@gmail.com> wrote:

Robert Kluin

unread,
Jul 5, 2011, 1:03:20 AM7/5/11
to google-a...@googlegroups.com

http://code.google.com/appengine/docs/java/blobstore/overview.html#Complete_Sample_App

In the upload handler I would try to get the values just as you usually do.

On Jul 4, 2011 8:35 PM, "David Walt" <beau...@gmail.com> wrote:

David D.

unread,
Jul 6, 2011, 1:09:09 PM7/6/11
to Google App Engine
Haha, you just repeated the first post.

On 5 juil, 01:03, Robert Kluin <robert.kl...@gmail.com> wrote:
> http://code.google.com/appengine/docs/java/blobstore/overview.html#Co...
>
> In the upload handler I would try to get the values just as you usually do.
> On Jul 4, 2011 8:35 PM, "David Walt" <beaucr...@gmail.com> wrote:

David D.

unread,
Jul 19, 2011, 6:34:31 PM7/19/11
to Google App Engine
Could someone provide a more detailed answer please? thx a lot.

Robert Kluin

unread,
Jul 19, 2011, 8:02:59 PM7/19/11
to google-a...@googlegroups.com
Heh, yeah was travelling with poor connectivity. Apparently my phone
hadn't synced or something. At least my answers were consistent. :)

Sorry, I don't know of of any other Java blobstore examples.

Robert

> --
> 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.
>
>

Reply all
Reply to author
Forward
0 new messages