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:
@@ -813,12 +813,19 @@ class ShareLinkUpload(APIView):
|
|||||||
if is_pro_version() and ENABLE_UPLOAD_LINK_VIRUS_CHECK:
|
if is_pro_version() and ENABLE_UPLOAD_LINK_VIRUS_CHECK:
|
||||||
check_virus = True
|
check_virus = True
|
||||||
|
|
||||||
token = seafile_api.get_fileserver_access_token(repo_id,
|
if check_virus:
|
||||||
obj_id,
|
token = seafile_api.get_fileserver_access_token(repo_id,
|
||||||
'upload-link',
|
obj_id,
|
||||||
share_link.username,
|
'upload-link',
|
||||||
use_onetime=False,
|
share_link.username,
|
||||||
check_virus=check_virus)
|
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:
|
if not token:
|
||||||
error_msg = 'Internal Server Error'
|
error_msg = 'Internal Server Error'
|
||||||
|
@@ -356,12 +356,19 @@ class UploadLinkUpload(APIView):
|
|||||||
if is_pro_version() and ENABLE_UPLOAD_LINK_VIRUS_CHECK:
|
if is_pro_version() and ENABLE_UPLOAD_LINK_VIRUS_CHECK:
|
||||||
check_virus = True
|
check_virus = True
|
||||||
|
|
||||||
token = seafile_api.get_fileserver_access_token(repo_id,
|
if check_virus:
|
||||||
obj_id,
|
token = seafile_api.get_fileserver_access_token(repo_id,
|
||||||
'upload-link',
|
obj_id,
|
||||||
uls.username,
|
'upload-link',
|
||||||
use_onetime=False,
|
uls.username,
|
||||||
check_virus=check_virus)
|
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:
|
if not token:
|
||||||
error_msg = 'Internal Server Error'
|
error_msg = 'Internal Server Error'
|
||||||
|
Reference in New Issue
Block a user