Feat: get thumb & download file in qiniu policy

This commit is contained in:
HFO4
2020-01-15 14:15:25 +08:00
parent 534e127f87
commit 7fbbcefc57
8 changed files with 62 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/HFO4/cloudreve/pkg/serializer"
"github.com/HFO4/cloudreve/pkg/util"
"path"
"strings"
)
/* =================
@@ -322,6 +323,9 @@ func (fs *FileSystem) CreateDirectory(ctx context.Context, fullPath string) erro
base := path.Dir(fullPath)
dir := path.Base(fullPath)
// 去掉结尾空格
dir = strings.TrimRight(dir, " ")
// 检查目录名是否合法
if !fs.ValidateLegalName(ctx, dir) {
return ErrIllegalObjectName