I've been struggling a bit w/ getting the GAE blobstore API to upload files
into a GAE T5 based app. All of the examples include using the blobstore
service to create a URL to which the file is uploaded, after which the
blobstore passes the control to a URL provided by user, e.g. :

url = blobstoreService.createUploadUrl("/upload")   // after the upload is
done, GAE was supposed to "post" to this URL

My initial take was to use the T5 component resources to create an event
handling URL and pass it into the blobstore service, with the expectation
that GAE will then post to my event URL at which point I'd post-process the
upload.

The problem is that it seems that GAE doesn't initiate a new POST request to
the given URL, but just "forwards" the request to it. As a result, because
the request is initially initiated to a non T5 URL, the whole T5 magic
doesn't kick in and my event handler isn't called. However, if I create a
simple servlet, mapped to , say '/upload', it does get called properly.

So, the idea I have is this : create a very simple servlet mapped to
"/upload", and whenever it's called, I'll just pipe in the request into the
T5 infrastructure so that my events get called as I want them to. The
question here is : if I did that, what entrypoint in the API should I use ?

Alternatively, I could certainly look up the T5 registry from the servlet (
I think I know how to do that) and invoke some service in it to "post
process" the uploads.

Can anyone point me where I should be looking at for the entrypoint into the
T5 processing pipeline that I can invoke from the servlet ?

Thanks in advance,

Alex K

Reply via email to