【问题标题】:Get uploaded file name (Python)获取上传的文件名(Python)
【发布时间】:2013-05-11 19:15:04
【问题描述】:

我想在我的 GAE 应用中获取上传文件的名称。目前当我跑步时

self.request.get('file')

我只得到文件的内容。

【问题讨论】:

标签: python google-app-engine


【解决方案1】:
img = request.files['image']
print("Name of Image", img.filename)

【讨论】:

  • 欢迎来到 StackOverflow。虽然这段代码可以解决问题,including an explanation 解决问题的方式和原因确实有助于提高帖子的质量,并可能导致更多的赞成票。请记住,您正在为将来的读者回答问题,而不仅仅是现在提问的人。请edit您的回答添加解释并说明适用的限制和假设。
猜你喜欢
  • 2013-08-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-01-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-04-09
相关资源
最近更新 更多