feat: add direct s3 upload flow
This commit is contained in:
@@ -38,12 +38,29 @@ type Config struct {
|
||||
Log Log `yaml:"Log"`
|
||||
Currency Currency `yaml:"Currency"`
|
||||
Trace trace.Config `yaml:"Trace"`
|
||||
S3 S3Config `yaml:"S3"`
|
||||
Administrator struct {
|
||||
Email string `yaml:"Email" default:"admin@ppanel.dev"`
|
||||
Password string `yaml:"Password" default:"password"`
|
||||
} `yaml:"Administrator"`
|
||||
}
|
||||
|
||||
type S3Config struct {
|
||||
Enable bool `yaml:"Enable" default:"false"`
|
||||
Region string `yaml:"Region" default:""`
|
||||
Bucket string `yaml:"Bucket" default:""`
|
||||
Endpoint string `yaml:"Endpoint" default:""`
|
||||
AccessKey string `yaml:"AccessKey" default:""`
|
||||
SecretKey string `yaml:"SecretKey" default:""`
|
||||
SessionToken string `yaml:"SessionToken" default:""`
|
||||
Prefix string `yaml:"Prefix" default:"app-upload"`
|
||||
PublicBaseURL string `yaml:"PublicBaseURL" default:""`
|
||||
UsePathStyle bool `yaml:"UsePathStyle" default:"false"`
|
||||
PresignExpireSeconds int64 `yaml:"PresignExpireSeconds" default:"300"`
|
||||
MaxUploadSize int64 `yaml:"MaxUploadSize" default:"104857600"`
|
||||
AllowedContentTypes string `yaml:"AllowedContentTypes" default:"application/zip,application/x-zip-compressed,application/gzip,application/x-gzip,application/octet-stream,text/plain,application/json"`
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
Host string `yaml:"Host" default:"localhost:6379"`
|
||||
Pass string `yaml:"Pass" default:""`
|
||||
|
||||
Reference in New Issue
Block a user