Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows上使用upload_file()函数出现content-length缺少的问题 #47

Closed
lizehua0127 opened this issue May 3, 2018 · 3 comments
Closed

Comments

@lizehua0127
Copy link

MissingContentLength You must provide the Content-Length HTTP header. NWFlYWE4ZTZfNWJhYTk0MGFfMWU3N182MzE2ZDA= OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E 2MTRlY2MzZDhmNmI5MWI1OTY4OGQ5OWY4YWFhNjAzOTkyNDJhZmQyOTk1YWVmOWFlNWE0MDE1NTNhODY 3MTdhNDNlZTk2ZThhZmMxMDJkZWM=

同样的代码,在mac上运行可以正常使用,在window上就就缺少content-length

@lizehua0127
Copy link
Author

window上是python2.7.15版本

@lizehua0127
Copy link
Author

发现是上传的文件是中文名的原因。。。

@dt3310321
Copy link
Contributor

cos python sdk only supports utf8 character, the default character on windows is gbk, you just need to transform the gbk to utf8!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants