Feat: qiniu upload & callback

This commit is contained in:
HFO4
2020-01-15 10:14:15 +08:00
parent 5be7ec98c1
commit e8d21b1e9b
15 changed files with 356 additions and 71 deletions

View File

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