Commit 92e1ee6d authored by Yunhua Koglin's avatar Yunhua Koglin
Browse files

back download

parent 657f78a0
......@@ -215,10 +215,11 @@ class AwsStorage(BlobStorageBase):
aws_secret_access_key=self._secret_key,
aws_session_token=self._session_token
)
outfile = io.BytesIO()
s3_client.download_fileobj(bucket, object_name, outfile)
return outfile.getvalue()
# return obj['Body'].read()
# outfile = io.BytesIO()
# s3_client.download_fileobj(bucket, object_name, outfile)
# return outfile.getvalue()
obj = s3_client.get_object(Bucket=self._bucket_name, Key=object_name)
return obj['Body'].read()
async def download_metadata(self, tenant: Tenant, object_name: str,
*, auth: Optional = None, timeout: int = 10, ** kwargs) -> Blob:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment