From 7793339426d271fc10de0a00a6b37b530383c9ae Mon Sep 17 00:00:00 2001 From: awu0403 <76416779+awu0403@users.noreply.github.com> Date: Wed, 1 May 2024 21:14:37 +0800 Subject: [PATCH] fix max upload size (#6047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com> --- seahub/views/repo.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/seahub/views/repo.py b/seahub/views/repo.py index 91f6a7c1c99..3c79992eb7f 100644 --- a/seahub/views/repo.py +++ b/seahub/views/repo.py @@ -332,6 +332,12 @@ def view_shared_dir(request, fileshare): # for 'upload file' no_quota = True if seaserv.check_quota(repo_id) < 0 else False + try: + max_upload_file_size = seafile_api.get_server_config_int('fileserver', 'max_upload_size') + except Exception as e: + logger.error(e) + max_upload_file_size = -1 + template = 'view_shared_dir_react.html' dir_share_link = request.path @@ -348,6 +354,7 @@ def view_shared_dir(request, fileshare): 'dir_list': dir_list, 'zipped': zipped, 'traffic_over_limit': False, + 'max_upload_file_size': max_upload_file_size, 'no_quota': no_quota, 'permissions': permissions, 'mode': mode,