I'm working on an Appengine application in Java that allows users to
upload images drawn through an HTML5 canvas library called PaintWeb
(http://code.google.com/p/paintweb/).

Currently I have a servlet that receives the XMLHttpRequest POST from
the paintweb javascript library as a formencoded image.

1. Paintweb.js library sends XMLHttpRequest POST
          send       = 'dataURL=' + encodeURIComponent(ev.dataURL),
          headers    = {'Content-Type': 'application/x-www-form-
urlencoded'};

2. A custom servlet decodes the form encoded image data as a blob and
stores that in the Datastore with an associated Drawing entity

3 Custom servlet serves the Blob's in the datastore as
ContentType("image/png")

I'm curious if I can use the new BlobstoreService and ImageService
features to upload my HTML5 canvas images and serve them as pure Blobs
(as shown in this tutorial
http://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance-image-serving-api-and-cute-dogs-on-office-chairs/)

According to the documentation (http://code.google.com/appengine/docs/
java/blobstore/overview.html#Uploading_a_Blob) it seems like the major
stopping point is that I need to POST a form with:
     <input type="file" name="myFile">

Which I don't think is possible from Paintweb.

Possibly a work around would be if there was some way on the server
side to store a blob in the Blobstorage (instead of the datastore) so
that you could reap the benefits of not using your CPU quota to serve
images.

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

Reply via email to