because of bug LIBCLOUD-931, write file downloads to tempfile
This commit is contained in:
parent
6241ca4da7
commit
4ec85a11f1
@ -39,7 +39,9 @@ class Uploader:
|
||||
|
||||
def download_stream(self, object_name):
|
||||
obj = self.container.get_object(object_name=object_name)
|
||||
return obj.as_stream()
|
||||
with NamedTemporaryFile() as tempfile:
|
||||
obj.download(tempfile.name, overwrite_existing=True)
|
||||
return open(tempfile.name, "rb")
|
||||
|
||||
def _get_container(self, provider, container, key, secret):
|
||||
if provider == "LOCAL":
|
||||
|
Loading…
x
Reference in New Issue
Block a user