随笔 - 321  文章 - 0  评论 - 6  阅读 - 34万
09 2022 档案
关于文件下载时服务端http header的设置
摘要:最近想要实现通过浏览器下载html文件时直接打开,而不是下载的功能,了解了下这方面相关的几个header设置项,简单记录下。 主要是content-type和content-disposition这两项,这两项同时满足后可以实现在浏览器上直接显示html文件内容 1、content-type需要设置 阅读全文
posted @ 2022-09-28 20:07 该用户很懒 阅读(1750) 评论(0) 推荐(0) 编辑
paramiko put方法调用时提示IOError: [Errno 2] No such file的几种可能
摘要:class sftp_operation: def __init__(self, host,port,username,password): self.host=host self.port=port self.username=username self.password=password tra 阅读全文
posted @ 2022-09-09 17:46 该用户很懒 阅读(629) 评论(0) 推荐(0) 编辑
python 创建类时遇到的问题 TypeError: xxxx() takes no arguments
摘要:最后发现问题是: def __init__定义时出问题了,推荐IDEA 或 pyCharm 自动提示输入,避免不必要的错误 阅读全文
posted @ 2022-09-09 15:14 该用户很懒 阅读(162) 评论(0) 推荐(0) 编辑

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示