Use Google Appengine BlobstoreService and ImageService to upload/serve Paintweb images

Skip to first unread message

Doug Daniels

Sep 20, 2010, 11:19:59 PM9/20/10
to PaintWeb discussions
I was wondering if anyone has had experience using Paintweb and Google
appengine. I've got a basic prototype working and submitting base64
encoded images to a Java servlet which are then stored in the
appengine datastore as a binary blob and retrieved and served by
another servlet.

Google appengine 3.6 (
multi-tenancy-support-high-performance_17.html) now supports a more
efficient way to upload/serve images, but it requires that the user
uploads a file in a encoding type "multipart/form-data".

Has anyone had experience writing an XMLHttpRequest with a custom MIME
type multipart/form-data with the Paintweb image encoded properly?

I have an open question on stackoverflow about this, but I was
thinking the Paintweb community might have a better clue as to how to
make the internals Google Appengine Blobstore compatible.

The only thing I've found about creating a AJAX POST as a "multipart/
form-data" is this Firefox example (that requires you to change
browser security settings, but that just seems necessary if you need
file system access).

Mihai Sucan

Sep 24, 2010, 5:28:17 AM9/24/10
to Doug Daniels, PaintWeb discussions
Hello Doug!

Thanks for your interest into PaintWeb!

I haven't used Google App Engine with PaintWeb, but you should be able to
nicely send it a JSON with XMLHttpRequest, containing the image data URI
generated by PaintWeb. Just follow the official docs from Google App
Engine, and you should be fine.

The answer you got from Stackoverflow sounds really good - same thoughts

You may also want to check how you can integrate PaintWeb into your web

You need to write a minimal extension for PaintWeb which handles the
imageSave event. When you get the event, you also receive the updated
image data URI that you can then pass to your server-side code, using an

If you want to see a working example, take a look at the Moodle
integration code:

Here is the PaintWeb extension which handles the imageSave event inside

As you can see, it constructs an XMLHttpRequest which is sent to the
server-side script.

Obviously, the server-side script needs to take the data URI and save it
somewhere on the server, and send back the URL to the saved image.

I hope the above answers your question. Please let me know if you have
further questions, I am glad to help!

Best regards,

Le Tue, 21 Sep 2010 06:19:59 +0300, Doug Daniels
<> a écrit:

Mihai Sucan

Message has been deleted


Sep 20, 2012, 12:33:36 PM9/20/12
Thank you for Paintweb! I've started trying to integrated into a project using classic ASP. The links in this email thread are dead, unfortunately, so I can't see how this was implemented. I want to click the Save icon and have the base64 URL pass back to a database using classic ASP code. Are there any examples of this? I've googled' and can find no examples. Thank you!
Reply all
Reply to author
0 new messages