feat: add direct s3 upload flow

This commit is contained in:
2026-05-13 11:24:13 -07:00
parent f6911965dc
commit 4fa9fcd232
16 changed files with 773 additions and 106 deletions
+17
View File
@@ -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:""`