Merge pull request #1055 from jumpserver/dev

Dev
pull/1061/head
老广 2018-03-07 23:31:31 +08:00 committed by GitHub
commit 3bf7d061c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -36,7 +36,6 @@ Jumpserver采纳分布式架构支持多机房跨区域部署中心节点
也可以查看我们完整文档包括了使用和开发 [文档](http://docs.jumpserver.org)
### Demo 和 截图
我们提供了DEMO和截图可以让你快速了解Jumpserver

View File

@ -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