Moving away from goamz to use minio-go instead. (#4193)
minio-go does fully managed way of handling S3 API requests
- Automatic bucket location management across all s3 regions.
- Transparently upload large files in multipart if file 64MB
or larger.
- Right GetObject() API provides compatibility with
io.ReadWriteSeeker interface.
- Various other APIs including bulk deletes, server side object
copy, bucket policies and bucket notifications.
Fixes #4182
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
b354d25d37
Коммит
f02620b291
@@ -138,26 +138,24 @@ type PasswordSettings struct {
|
||||
}
|
||||
|
||||
type FileSettings struct {
|
||||
MaxFileSize *int64
|
||||
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
|
||||
MaxFileSize *int64
|
||||
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
|
||||
AmazonS3SSL *bool
|
||||
}
|
||||
|
||||
type EmailSettings struct {
|
||||
@@ -374,26 +372,27 @@ func (o *Config) SetDefaults() {
|
||||
o.SqlSettings.AtRestEncryptKey = NewRandomString(32)
|
||||
}
|
||||
|
||||
if o.FileSettings.AmazonS3Endpoint == "" {
|
||||
// Defaults to "s3.amazonaws.com"
|
||||
o.FileSettings.AmazonS3Endpoint = "s3.amazonaws.com"
|
||||
}
|
||||
if o.FileSettings.AmazonS3Region == "" {
|
||||
// Defaults to "us-east-1" region.
|
||||
o.FileSettings.AmazonS3Region = "us-east-1"
|
||||
}
|
||||
if o.FileSettings.AmazonS3SSL == nil {
|
||||
o.FileSettings.AmazonS3SSL = new(bool)
|
||||
*o.FileSettings.AmazonS3SSL = true // Secure by default.
|
||||
}
|
||||
if o.FileSettings.MaxFileSize == nil {
|
||||
o.FileSettings.MaxFileSize = new(int64)
|
||||
*o.FileSettings.MaxFileSize = 52428800 // 50 MB
|
||||
}
|
||||
|
||||
if len(*o.FileSettings.PublicLinkSalt) == 0 {
|
||||
o.FileSettings.PublicLinkSalt = new(string)
|
||||
*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