This is the file
http://code.google.com/p/loxal/source/browse/src/loxal/lox/service/meta/server/BlobUploadSvcImpl.scala?repo=lox

that throws this exception. I've tried it with its doGet and doPost
methods — same result.

On Jul 21, 5:48 pm, Alexander Orlov <[email protected]> wrote:
> I'm trying to persist blobs using GAE and assign them to the user who
> has uploaded the blob.
> I've took the following sample code as a starting point:
>
> http://code.google.com/intl/en-US/appengine/docs/java/blobstore/overv...
>
> Uploading blobs works fine as you can see here: lox.loxal.org >
> "Create Task"
>
> To assign a blob to a certain user I need the blob's BlobKey... So I
> try to use this (Scala code)...
>
>   val req: HttpServletRequest = this.getThreadLocalRequest
>   val blobs: java.util.Map[java.lang.String, BlobKey] =
> blobstoreService.getUploadedBlobs(req)
>   val blobKey: BlobKey = blobs.get("myFile")
>
> ...in the server-side code to return the BlobKey. But
>
>   val blobs: java.util.Map[java.lang.String, BlobKey] =
> blobstoreService.getUploadedBlobs(req)
>
> throws this exception:
>
>   Caused by: java.lang.IllegalStateException: Must be called from a
> blob upload callback request.
>
> How can I use HttpServletRequest data in server-side code without
> getting this exception?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-web-toolkit?hl=en.

Reply via email to