feat: 录像存储server类型,可以设置如何存储了 (#4699)

feat: Server 类型的录像存储可以上传到 oss等上面
This commit is contained in:
老广
2020-09-27 14:34:47 +08:00
committed by GitHub
parent d4037998c8
commit e3648d11b1
8 changed files with 74 additions and 33 deletions

View File

@@ -125,7 +125,7 @@ class SessionReplayViewSet(AsyncApiMixin, viewsets.ViewSet):
if serializer.is_valid():
file = serializer.validated_data['file']
name, err = session.save_to_storage(file)
name, err = session.save_replay_to_storage(file)
if not name:
msg = "Failed save replay `{}`: {}".format(session_id, err)
logger.error(msg)
@@ -155,6 +155,7 @@ class SessionReplayViewSet(AsyncApiMixin, viewsets.ViewSet):
return data
def is_need_async(self):
return False
if self.action != 'retrieve':
return False
return True