Closed huangheLee closed 4 years ago
遇到同样的问题。 在 serverless 环境下,可写目录受限。
仅七牛内部员工可见:https://jira.qiniu.io/browse/TS-990
新版本v7.2.9支持指定文件路径
v7.2.9之后的版本支持自定义.qiniu_pythonsdk_hostscache.json 文件保存路径,.qiniu_pythonsdk_hostscache.json 这个文件只有在上传、fetch、prefetch操作时才会生成。如果您需要手动指定.qiniu_pythonsdk_hostscache.json 保存路径,您可以通过hostscache_dir 参数来指定。 上传相关源码:https://github.com/qiniu/python-sdk/blob/00c1a67f6ecb39bf890be48828fb81cd8264357f/qiniu/services/storage/uploader.py
生产环境中很多目录是不允许程序写入,但是似乎该文件只能在运行程序的当前目录生成 这时指定该文件生成的目录就会有必要