2023-08-20 22:29:08 +08:00
|
|
|
package oss
|
|
|
|
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
|
2024-01-15 15:03:05 +08:00
|
|
|
type File struct {
|
2024-01-15 18:48:01 +08:00
|
|
|
Name string `json:"name"`
|
|
|
|
Size int64 `json:"size"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
Ext string `json:"ext"`
|
2024-01-15 15:03:05 +08:00
|
|
|
}
|
2023-08-20 22:29:08 +08:00
|
|
|
type Uploader interface {
|
2024-01-15 15:03:05 +08:00
|
|
|
PutFile(ctx *gin.Context, name string) (File, error)
|
2023-09-28 18:09:45 +08:00
|
|
|
PutImg(imageURL string, useProxy bool) (string, error)
|
2023-08-21 06:27:30 +08:00
|
|
|
Delete(fileURL string) error
|
2023-08-20 22:29:08 +08:00
|
|
|
}
|