检索保存到 blobstore 的照片的元数据
Retrieving metadata of a photo saved to blobstore
我正在使用 plupload. The BlobInfo object 将照片上传到 blobstore 有一些元数据
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 或服务器端获取照片的其他元数据?具体来说,我需要检索 "description" 的元数据字段。
我会使用 exif-py 如下:
blob_reader = blobstore.BlobReader(blob_key)
blob_reader_data = StringIO.StringIO(blob_reader.read())
tags = exifread.process_file(blob_reader_data)
它的标签对象 returns 包含您要查找的元数据。
我正在使用 plupload. The BlobInfo object 将照片上传到 blobstore 有一些元数据
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 或服务器端获取照片的其他元数据?具体来说,我需要检索 "description" 的元数据字段。
我会使用 exif-py 如下:
blob_reader = blobstore.BlobReader(blob_key)
blob_reader_data = StringIO.StringIO(blob_reader.read())
tags = exifread.process_file(blob_reader_data)
它的标签对象 returns 包含您要查找的元数据。