【问题标题】:Retrieving metadata of a photo saved to blobstore检索保存到 blobstore 的照片的元数据
【发布时间】:2017-06-15 15:12:18
【问题描述】:

我正在使用 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 或服务器端获取照片的其他元数据?具体来说,我需要检索一个“描述”的元数据字段。

【问题讨论】:

    标签: python google-app-engine blobstore 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)
    

    它返回的标签对象包含您要查找的元数据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-15
      • 2012-09-15
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 2021-05-24
      • 2014-06-27
      • 1970-01-01
      相关资源
      最近更新 更多