开源版本默认每次只能上传20个证书文件

This commit is contained in:
GoEdgeLab
2023-03-24 15:29:51 +08:00
parent f5d95a01f5
commit 7f81622508
3 changed files with 12 additions and 2 deletions

View File

@@ -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

View File

@@ -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
}