开发者

Google AppEngine BlobInfo() features

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜