Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top