Add S3 configuration and presigned URL logic for file upload and download
This commit is contained in:
@@ -4,4 +4,19 @@ import "github.com/zeromicro/go-zero/rest"
|
||||
|
||||
type Config struct {
|
||||
rest.RestConf
|
||||
Database DatabaseConfig
|
||||
S3 S3Config
|
||||
}
|
||||
|
||||
type DatabaseConfig struct {
|
||||
DSN string
|
||||
}
|
||||
|
||||
type S3Config struct {
|
||||
Region string
|
||||
Bucket string
|
||||
AccessKeyID string
|
||||
SecretAccessKey string
|
||||
Endpoint string `json:",optional"` // Optional: for S3-compatible services
|
||||
PresignedURLExpiration int64 `json:",default=3600"` // Default 1 hour
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user