Merge pull request #1763 from benburkert/non-s3-region
support unofficial S3 regions
Этот коммит содержится в:
@@ -68,21 +68,25 @@ type LogSettings struct {
|
||||
}
|
||||
|
||||
type FileSettings struct {
|
||||
DriverName string
|
||||
Directory string
|
||||
EnablePublicLink bool
|
||||
PublicLinkSalt string
|
||||
ThumbnailWidth int
|
||||
ThumbnailHeight int
|
||||
PreviewWidth int
|
||||
PreviewHeight int
|
||||
ProfileWidth int
|
||||
ProfileHeight int
|
||||
InitialFont string
|
||||
AmazonS3AccessKeyId string
|
||||
AmazonS3SecretAccessKey string
|
||||
AmazonS3Bucket string
|
||||
AmazonS3Region string
|
||||
DriverName string
|
||||
Directory string
|
||||
EnablePublicLink bool
|
||||
PublicLinkSalt string
|
||||
ThumbnailWidth int
|
||||
ThumbnailHeight int
|
||||
PreviewWidth int
|
||||
PreviewHeight int
|
||||
ProfileWidth int
|
||||
ProfileHeight int
|
||||
InitialFont string
|
||||
AmazonS3AccessKeyId string
|
||||
AmazonS3SecretAccessKey string
|
||||
AmazonS3Bucket string
|
||||
AmazonS3Region string
|
||||
AmazonS3Endpoint string
|
||||
AmazonS3BucketEndpoint string
|
||||
AmazonS3LocationConstraint *bool
|
||||
AmazonS3LowercaseBucket *bool
|
||||
}
|
||||
|
||||
type EmailSettings struct {
|
||||
@@ -210,6 +214,16 @@ func (o *Config) SetDefaults() {
|
||||
o.FileSettings.PublicLinkSalt = NewRandomString(32)
|
||||
}
|
||||
|
||||
if o.FileSettings.AmazonS3LocationConstraint == nil {
|
||||
o.FileSettings.AmazonS3LocationConstraint = new(bool)
|
||||
*o.FileSettings.AmazonS3LocationConstraint = false
|
||||
}
|
||||
|
||||
if o.FileSettings.AmazonS3LowercaseBucket == nil {
|
||||
o.FileSettings.AmazonS3LowercaseBucket = new(bool)
|
||||
*o.FileSettings.AmazonS3LowercaseBucket = false
|
||||
}
|
||||
|
||||
if len(o.EmailSettings.InviteSalt) == 0 {
|
||||
o.EmailSettings.InviteSalt = NewRandomString(32)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user