I spend several hours searching for something like your code and could
find any.
This code is kinda what I wrote myself (Yours is better).

The thing is I that really think that there should be a static/fixed
endpoint for uploads.

The flow should be something like:
1. You upload/post to a fixed (configurable) url i.e. /upload/?
param1=val&param2=val
2. That url is not limited to the 1MB and it will store the content in
the blobstore
3. You will define using regex which dispatcher/controller will
receive the upload results
4. This dispatcher/controller will be called using a forward redirect
and not an actual redirect
5. The dispatcher/controller will return a response which doesn't have
to be a redirect

--- 10 minutes pause ---
OK, I open an issue for it 
http://code.google.com/p/googleappengine/issues/detail?id=3686

On Sep 6, 10:21 pm, John McLaughlin <[email protected]>
wrote:
> I think you've got the picture.  I was dealing with this sort of thing
> a couple weeks ago and wrote a cookbook page that kinda-sorta makes it
> a one step 
> process.http://appengine-cookbook.appspot.com/recipe/just-in-time-blobstore-u...
>
> Let me know if it's helpful.
>
> -- John
>
> On Sep 5, 11:03 am, Shay Erlichmen <[email protected]> wrote:
>
>
>
>
>
>
>
> > I have an OCR service* that allows you to upload pictures and get the
> > text.
> > The service has a very simple REST API (/post_image) where you POST
> > the image (and some metadata) and you get the result in JSON format.
> > The service is called from Flash, Web, and other clients.
>
> > So far I've used blobs in the datastore to store and serve the images
> > and I want to move to the blobstore (in order to use get_serving_url)
> > As far as I can see, I need to break my /post_image method into two
> > steps: the first step will be to call a new method /prepare_upload
> > which will get me the upload url (by calling create_upload_url(...)),
> > then call the returned upload_url and get the JSON data.
> > To make things more awkward, the result from the upload url cannot be
> > the JSON data itself but a redirect to a url that returns the JSON
> > data.
>
> > Questions:
> > 1. Did I analyze it right? Is is a two stepper flow for my clients?
> > are there any unnecessary steps??.
> > 2. In case I got it correct, are there any plans for direct upload to
> > the blobstore (without calling create_upload_url(...))
>
> > * service for illustration purpose only, I don't really have this
> > exact service.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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-appengine?hl=en.

Reply via email to