增加自动化代码匹配进入业务库功能 (#1249)

* Update api.go.tpl

修复不创建资源标识时 批量删除 方法内 deletedBy 未声明的问题

* 可自动创建业务库

* 自动化业务库回滚适配

* 修复断点续传路径穿越漏洞

* 增加指定菜单亮起功能

* 增加菜单高亮功能,调整版本号

* fixed: 用户后台注册没接收手机号和邮箱

Co-authored-by: dzwvip <dzwvip@qq.com>
Co-authored-by: SliverHorn <503551462@qq.com>
This commit is contained in:
奇淼(piexlmax
2022-10-15 13:55:47 +08:00
committed by GitHub
parent 28c928890a
commit 03265e03fc
20 changed files with 140 additions and 64 deletions

View File

@@ -1,8 +1,10 @@
package utils
import (
"errors"
"os"
"strconv"
"strings"
)
// 前端传来文件片与当前片为什么文件的第几片
@@ -53,6 +55,9 @@ func CheckMd5(content []byte, chunkMd5 string) (CanUpload bool) {
//@return: string, error
func makeFileContent(content []byte, fileName string, FileDir string, contentNumber int) (string, error) {
if strings.Index(fileName, "./") > -1 || strings.Index(FileDir, "./") > -1 {
return "", errors.New("文件名或路径不合法")
}
path := FileDir + fileName + "_" + strconv.Itoa(contentNumber)
f, err := os.Create(path)
if err != nil {