ssk
ssk

Reputation: 9265

upload image to Google App Engine and share the image with the users

Are there examples to upload an image to Google App Engine(Python) through HTTP? Also, is it possible to retrieve the image from Blob store and share the image link to someone?

Upvotes: 1

Views: 1255

Answers (2)

Stuart Langley
Stuart Langley

Reputation: 7054

Use create_upload_url to create a URL the you can use to upload your images direct to the blobstore/cloud storage.

From there you can either use get_seving_url to create a URL to your image that can be shared with users to access your image, or if you want access control over who can access the image then use send_blob and BlobstoreDownloadHandler to send your images back to your users.

Upvotes: 2

Daniel Nouri
Daniel Nouri

Reputation: 1274

Here's an example of a guestbook app from Google, where users can upload avatar images. It explains how to use the db.BlobProperty() to store the image. How to write a handler to upload (class Guestbook), and how to serve the image (class Image). It even goes on to explain how to scale images.

Upvotes: 2

Related Questions