Feat: generate upload server url from policy

This commit is contained in:
HFO4
2020-01-13 10:03:45 +08:00
parent 6b6bfb4c6b
commit 37e78cb39b
3 changed files with 44 additions and 1 deletions

View File

@@ -64,7 +64,7 @@ func BuildUser(user model.User) User {
SaveType: user.Policy.Type,
MaxSize: fmt.Sprintf("%.2fmb", float64(user.Policy.MaxSize)/(1024*1024)),
AllowedType: user.Policy.OptionsSerialized.FileType,
UploadURL: user.Policy.Server,
UploadURL: user.Policy.GetUploadURL(),
AllowGetSource: user.Policy.IsOriginLinkEnable,
},
Group: group{