【发布时间】:2017-08-01 20:24:28
【问题描述】:
有没有办法使用response.write 返回具有正确内容类型的文件(例如图像、脚本)?这是我一直在使用的:
with open(path) as f:
self.response.write(f.read())
但这会将内容类型设置为text/html。或者response.write 不是解决这个问题的正确方法?
【问题讨论】:
标签: python google-app-engine webapp2