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

AliyunFile中read方法获取图片后没有正确赋值 #18

Closed
huhinka opened this issue Jun 22, 2017 · 1 comment
Closed

AliyunFile中read方法获取图片后没有正确赋值 #18

huhinka opened this issue Jun 22, 2017 · 1 comment

Comments

@huhinka
Copy link
Contributor

huhinka commented Jun 22, 2017

content = self._storage.bucket.get_object(self._name)
self.file = six.BytesIO(content)

这里的contentoss2.models.GetObjectResult对象,直接作为参数传给six.BytesIO()会返回类似于'<oss2.models.GetObjectResult object at 0x7f59ddc0f250>'这样的字符串,导致无法读取图片。

传给six.BytesIO()的应该为content.read()

@huhinka huhinka changed the title AliyunFile中read方法获取图片后未能没有正确赋值 AliyunFile中read方法获取图片后没有正确赋值 Jun 22, 2017
@xiewenya
Copy link
Owner

多谢, 你可以提交一下pull request

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