2017-01-30 12 views
1

pluploadを使用してブロブストアに写真をアップロードしています。 BlobInfo objectは、いくつかのメタデータを持っているブロブストアに保存された写真のメタデータを取得する

content_type: The content type of the blob. 
creation: The creation date of the blob, or when it was uploaded. 
filename: The file name that the user selected from their machine. 
size: The size of the uncompressed blob. 
md5_hash: The MD5 hash value of the uploaded blob. 

私の質問は、私はどちらかpluploadまたはサーバーサイドからの写真の他のメタデータを得ることができる方法ですか?具体的には、取得する必要がある「説明」のメタデータフィールドがあります。

答えて

1

次のように私はexif-pyを使用します。

blob_reader = blobstore.BlobReader(blob_key) 
blob_reader_data = StringIO.StringIO(blob_reader.read()) 
tags = exifread.process_file(blob_reader_data) 

タグは、それはあなたが探しているメタデータが含ま返すオブジェクト。

関連する問題