fix: upload image issues

This commit is contained in:
2025-12-31 17:42:51 +08:00
parent 5a364a995a
commit 5ed6262e02
6 changed files with 104 additions and 29 deletions

View File

@@ -1,8 +1,8 @@
package storage
type Config struct {
Type string `json:"type" yaml:"type" toml:"type"` // local, s3
LocalPath string `json:"local_path" yaml:"local_path" toml:"local_path"` // for local
Secret string `json:"secret" yaml:"secret" toml:"secret"` // for signing
BaseURL string `json:"base_url" yaml:"base_url" toml:"base_url"` // public url prefix
Type string // local, s3
LocalPath string // for local
Secret string // for signing
BaseURL string // public url prefix
}

View File

@@ -13,10 +13,14 @@ import (
"go.ipao.vip/atom/opt"
)
const DefaultPrefix = "Storage"
func DefaultProvider() container.ProviderContainer {
return container.ProviderContainer{
Provider: Provide,
Options: []opt.Option{},
Options: []opt.Option{
opt.Prefix(DefaultPrefix),
},
}
}