diff --git a/internal/web/actions/default/servers/certs/uploadBatchPopup.go b/internal/web/actions/default/servers/certs/uploadBatchPopup.go index 9d4eb7ef..68350b5f 100644 --- a/internal/web/actions/default/servers/certs/uploadBatchPopup.go +++ b/internal/web/actions/default/servers/certs/uploadBatchPopup.go @@ -24,6 +24,8 @@ func (this *UploadBatchPopupAction) Init() { } func (this *UploadBatchPopupAction) RunGet(params struct{}) { + this.Data["maxFiles"] = this.maxFiles() + this.Show() } @@ -42,7 +44,7 @@ func (this *UploadBatchPopupAction) RunPost(params struct { } // 限制每次上传的文件数量 - const maxFiles = 10_000 + var maxFiles = this.maxFiles() if len(files) > maxFiles { this.Fail("每次上传最多不能超过" + types.String(maxFiles) + "个文件") return diff --git a/internal/web/actions/default/servers/certs/uploadBatchPopup_ext.go b/internal/web/actions/default/servers/certs/uploadBatchPopup_ext.go new file mode 100644 index 00000000..ba9849e2 --- /dev/null +++ b/internal/web/actions/default/servers/certs/uploadBatchPopup_ext.go @@ -0,0 +1,8 @@ +// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . +//go:build !plus + +package certs + +func (this *UploadBatchPopupAction) maxFiles() int { + return 20 +} diff --git a/web/views/@default/servers/certs/uploadBatchPopup.html b/web/views/@default/servers/certs/uploadBatchPopup.html index 807fce39..154772bf 100644 --- a/web/views/@default/servers/certs/uploadBatchPopup.html +++ b/web/views/@default/servers/certs/uploadBatchPopup.html @@ -9,7 +9,7 @@
点击后在弹出的文件选择框中支持多选;不用担心文件名和顺序问题,系统会自动匹配。
+点击后在弹出的文件选择框中支持多选;不用担心文件名和顺序问题,系统会自动匹配;免费版本限制每次最多上传{{maxFiles}}个文件。