diff --git a/README.md b/README.md index 9d15557fb..ba6766a1f 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Jumpserver采纳分布式架构,支持多机房跨区域部署,中心节点 也可以查看我们完整文档包括了使用和开发 [文档](http://docs.jumpserver.org) - ### Demo 和 截图 我们提供了DEMO和截图可以让你快速了解Jumpserver diff --git a/apps/terminal/api.py b/apps/terminal/api.py index da0e88820..370835ca2 100644 --- a/apps/terminal/api.py +++ b/apps/terminal/api.py @@ -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