views:

107

answers:

1

In order to save precious bandwidth, the image serving app (a minor, but important part of the total app) tries to serve only thumbnails or reduced size previews of possibly large photos or illustrations. Storing the original image in the BlobStore is simple enough, and generating the thumbnails is also simple using the the Image service.

What I don't know how to do is put the thumbnails back into the BlobStore. I'd much rather do it this way so I don't have to implement two methods for serving images. Is there a way to send data from my app into the BlobStore? The only way I can concieve is to generate an upload URL and then post to that url using the URL Fetch Service, But if I have to go to that amount of trouble, I'd rather just put the thumbnails in the DataStore.

+4  A: 

You don't need to create thumbnails from images in BlobStore at all - use get_serving_url function instead (see http://code.google.com/appengine/docs/python/images/functions.html).

This function generates and caches thumbnails from large images in the fly and doesn't even cost you any CPU (see this post)

Andris
That looks perfect!
TokenMacGuy