Feat: upload session recycle crontab job / API for cleanup all upload session

This commit is contained in:
HFO4
2022-02-27 14:16:36 +08:00
parent 3444b4a75e
commit 7dd636da74
21 changed files with 248 additions and 21 deletions

View File

@@ -216,13 +216,7 @@ func (policy *Policy) IsThumbExist(name string) bool {
// IsTransitUpload 返回此策略上传给定size文件时是否需要服务端中转
func (policy *Policy) IsTransitUpload(size uint64) bool {
if policy.Type == "local" {
return true
}
if policy.Type == "onedrive" && size < 4*1024*1024 {
return true
}
return false
return policy.Type == "local"
}
// IsPathGenerateNeeded 返回此策略是否需要在生成上传凭证时生成存储路径