未验证 提交 3c6c05f8 编写于 作者: L liuzheng712

fix: update

上级 51d7e511
......@@ -288,8 +288,12 @@ class SessionReplayViewSet(viewsets.ViewSet):
if value.get("TYPE", '') == "s3":
client, bucket = self.s3Client(value)
try:
client.head_object(Bucket=bucket, Key=path)
client.download_file(bucket, path, default_storage.base_location + '/' + path)
date = self.session.date_start.strftime('%Y-%m-%d')
client.head_object(Bucket=bucket,
Key=os.path.join(date, str(self.session.id) + '.replay.gz'))
client.download_file(bucket, os.path.join(date, str(self.session.id) + '.replay.gz'),
default_storage.base_location + '/' + path)
return redirect(default_storage.url(path))
except:
pass
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册