我正在使用plupload将照片上传到blobstore。 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或serverside获取照片的其他元数据?具体来说,我需要检索“描述”的元数据字段。
答案 0 :(得分:1)
我会使用exif-py,如下所示:
blob_reader = blobstore.BlobReader(blob_key)
blob_reader_data = StringIO.StringIO(blob_reader.read())
tags = exifread.process_file(blob_reader_data)
它返回的标签对象包含您正在寻找的元数据。