Feat: Put file in oss handler

This commit is contained in:
HFO4
2020-01-17 10:52:43 +08:00
parent 7eda63f089
commit 83a17645a1
3 changed files with 41 additions and 15 deletions

View File

@@ -162,6 +162,11 @@ func (policy *Policy) IsPathGenerateNeeded() bool {
return policy.Type != "remote"
}
// IsThumbGenerateNeeded 返回此策略是否需要在上传后生成缩略图
func (policy *Policy) IsThumbGenerateNeeded() bool {
return policy.Type == "local"
}
// GetUploadURL 获取文件上传服务API地址
func (policy *Policy) GetUploadURL() string {
server, err := url.Parse(policy.Server)