21 lines
578 B
Go
21 lines
578 B
Go
package file
|
|
|
|
type UploadDTO struct {
|
|
ObjectKey string `json:"object_key"`
|
|
URL string `json:"url"`
|
|
ThumbnailURL string `json:"thumbnail_url,omitempty"`
|
|
MediumURL string `json:"medium_url,omitempty"`
|
|
Filename string `json:"filename"`
|
|
ContentType string `json:"content_type"`
|
|
Size int64 `json:"size"`
|
|
objectKeys []string
|
|
}
|
|
|
|
// ObjectKeys 返回上传产生的全部对象键,包含图片缩略图与中图变体。
|
|
func (d *UploadDTO) ObjectKeys() []string {
|
|
if d == nil {
|
|
return nil
|
|
}
|
|
return append([]string(nil), d.objectKeys...)
|
|
}
|