Question

In a python Google App engine app, I can create a db.Blob object containing binary data:

blob = db.Blob(open("image.png", "rb").read())

How do I store that as the value of a blobstore.BlobReferenceProperty?

I could create a URL handle and send the blob across a URL, but can I somehow turn the db.Blob into a blob store entity directly?

Was it helpful?

Solution

The files API to write files to the blobstore has been deprecated. You have to use GCS instead, because Google is moving away from the blobstore. See this GIST

But your application can also upload your blob to the blobstore of your application. See this GIST.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top