Commit 0d8a6002 authored by oldseven's avatar oldseven

#1258 bug fix: 阿里云OSS录像无法回放问题

parent 787be3ff
...@@ -297,6 +297,10 @@ class SessionReplayViewSet(viewsets.ViewSet): ...@@ -297,6 +297,10 @@ class SessionReplayViewSet(viewsets.ViewSet):
date = self.session.date_start.strftime('%Y-%m-%d') date = self.session.date_start.strftime('%Y-%m-%d')
file_path = os.path.join(date, str(self.session.id) + '.replay.gz') file_path = os.path.join(date, str(self.session.id) + '.replay.gz')
target_path = default_storage.base_location + '/' + path target_path = default_storage.base_location + '/' + path
folder_path = default_storage.base_location + date
if not default_storage.exists(folder_path):
os.mkdir(folder_path)
if client and client.has_file(file_path) and \ if client and client.has_file(file_path) and \
client.download_file(file_path, target_path): client.download_file(file_path, target_path):
......
Markdown is supported
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