Feat: COS credential / upload callback

This commit is contained in:
HFO4
2020-01-23 12:38:32 +08:00
parent e894450d5e
commit 8d437a451c
11 changed files with 282 additions and 4 deletions

View File

@@ -20,12 +20,16 @@ type UploadPolicy struct {
type UploadCredential struct {
Token string `json:"token"`
Policy string `json:"policy"`
Path string `json:"path"`
Path string `json:"path"` // 存储路径
AccessKey string `json:"ak"`
KeyTime string `json:"key_time,omitempty"` // COS用有效期
Callback string `json:"callback,omitempty"` // 回调地址
Key string `json:"key,omitempty"` // 文件标识符通常为回调key
}
// UploadSession 上传会话
type UploadSession struct {
Key string
UID uint
PolicyID uint
VirtualPath string