开发者

Google AppEngine BlobInfo() features

开发者 https://www.devze.com 2023-02-08 03:39 出处:网络
Hi! The official GAE documentation instists on existing such heplful BlobInfo instance properties as: content_type;

Hi!

The official GAE documentation instists on existing such heplful BlobInfo instance properties as:

  • content_type;
  • creation;
  • filename;
  • size

I have try to using them in my app, but I'm can't imagine开发者_如何学Go how to do it correctly and I'm can't find a some practical examples how to utilize this GAE features nowhere. Can you help me by demonstation a scratches of verified python code?

Real thanks!


Assuming that you have the key to your blob in a variable named blob_key. You could write code like this:

blob_info = blobstore.BlobInfo.get(blob_key)
print('filename: %s' % blob_info.filename)

blob key is usually returned by the BlobstoreUploadHandler that you use to upload your file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号