2017-01-30 6 views
1

plupload을 사용하여 BLOBSTORE에 사진을 업로드하고 있습니다. 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 또는 서버 측에서 사진의 다른 메타 데이터를 얻을 수있는 방법인가? 특히, 검색해야하는 "설명"의 메타 데이터 필드가 있습니다. 다음과 같이

답변

1

나는 exif-py을 사용합니다 :

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

태그가 반환 당신이 찾고있는 메타 데이터를 포함하는 객체.