Can I store a blob with a key_name with Google Appengine ndb?
When you upload data to the blobstore you receive a blob_key and a file_name. The blob_key is unique. The file_name is NOT unique. When you do another upload with the same file_name a new version is stored in the blobstore with the same file_name and a new unique blob_key. The first blob is NOT deleted. You have to do it yourself.
To administer these uploaded blobs, you create a datastore entity with your own key_name. You can use the file_name for this purpose. And you can use a BlobKeyProperty (NDB) or blobstore.BlobReferenceProperty (datastore) in this entity to reference your blob (to save your blob_key reference). In this way your key_name / file_name uniquely identifies your blob.
I am building a service where you can upload images. On the blob creation I would like to supply a key_name, which will be used by the relevant entity to retrieve it later.