Py学习  »  问与答

百度bcs文件上传,不懂

1160974245 • 10 年前 • 3160 次点击  

我想直接上传文件到bcs但是不行

错误:must be encoded string without NULL bytes, not str

elif request.method == 'POST': file = request.FILES['cs'] b = bcs.bucket(BUCKET) name = '/%s' % file.name o = b.object(name) o.put_file(file.read()) 谢谢!

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/804
 
3160 次点击  
文章 [ 1 ]  |  最新文章 10 年前