chore: get ws
This commit is contained in:
+4
-4
@@ -13,7 +13,7 @@ import (
|
||||
alioss "github.com/aliyun/aliyun-oss-go-sdk/oss"
|
||||
)
|
||||
|
||||
const MaxUploadBytes = 128 << 20 // 128MB
|
||||
const MaxUploadBytes = 128 << 20
|
||||
|
||||
var unsafeFileChars = regexp.MustCompile(`[^\w.\-\p{Han}]+`)
|
||||
|
||||
@@ -23,12 +23,12 @@ type Config struct {
|
||||
BucketName string
|
||||
Endpoint string
|
||||
Host string
|
||||
Dir string // 固定前缀,如 test/chore/files/
|
||||
Dir string
|
||||
}
|
||||
|
||||
type Result struct {
|
||||
URL string `json:"url"`
|
||||
Path string `json:"path"` // object key,如 test/chore/files/20260403/a.zip
|
||||
Path string `json:"path"`
|
||||
Host string `json:"host"`
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ type UploadInput struct {
|
||||
Filename string
|
||||
Content []byte
|
||||
ContentType string
|
||||
Dir string // 可选,覆盖配置 oss.dir
|
||||
Dir string
|
||||
}
|
||||
|
||||
func LoadConfig() Config {
|
||||
|
||||
Reference in New Issue
Block a user