Modify: clean modals

This commit is contained in:
HFO4
2020-03-11 15:22:21 +08:00
parent 4d70f9fa3e
commit 4ba24e0cf1
30 changed files with 22 additions and 598 deletions

View File

@@ -356,17 +356,6 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request, fs *filesyst
fs.Use("AfterValidateFailed", filesystem.HookGiveBackCapacity)
ctx = context.WithValue(ctx, fsctx.FileModelCtx, *originFile)
} else {
// 检查父目录指定存储策略
if exist, folder := fs.IsPathExist(filePath); exist {
if folder.PolicyID != 0 {
// 尝试获取并重设存储策略
if policy, err := model.GetPolicyByID(fs.User.GetPolicyID(folder.PolicyID)); err == nil {
fs.User.Policy = policy
fs.DispatchHandler()
}
}
}
// 给文件系统分配钩子
fs.Use("BeforeUpload", filesystem.HookValidateFile)
fs.Use("BeforeUpload", filesystem.HookValidateCapacity)