mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: get thumb & download file in qiniu policy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user