1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

only check virus in pro version

This commit is contained in:
lian
2021-05-25 13:50:53 +08:00
parent 9cbc27a7f2
commit b21f15296e
2 changed files with 26 additions and 12 deletions

View File

@@ -813,12 +813,19 @@ class ShareLinkUpload(APIView):
if is_pro_version() and ENABLE_UPLOAD_LINK_VIRUS_CHECK:
check_virus = True
if check_virus:
token = seafile_api.get_fileserver_access_token(repo_id,
obj_id,
'upload-link',
share_link.username,
use_onetime=False,
check_virus=check_virus)
else:
token = seafile_api.get_fileserver_access_token(repo_id,
obj_id,
'upload-link',
share_link.username,
use_onetime=False)
if not token:
error_msg = 'Internal Server Error'

View File

@@ -356,12 +356,19 @@ class UploadLinkUpload(APIView):
if is_pro_version() and ENABLE_UPLOAD_LINK_VIRUS_CHECK:
check_virus = True
if check_virus:
token = seafile_api.get_fileserver_access_token(repo_id,
obj_id,
'upload-link',
uls.username,
use_onetime=False,
check_virus=check_virus)
else:
token = seafile_api.get_fileserver_access_token(repo_id,
obj_id,
'upload-link',
uls.username,
use_onetime=False)
if not token:
error_msg = 'Internal Server Error'