mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 20:40:26 +08:00
开源版本默认每次只能上传20个证书文件
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user