|
|
|
@@ -51,6 +51,7 @@ func Init() error { |
|
|
|
switch setting.Attachment.StoreType { |
|
|
|
case LocalStorageType: |
|
|
|
Attachments, err = NewLocalStorage(setting.Attachment.Path) |
|
|
|
log.Info("local storage inited.") |
|
|
|
case MinioStorageType: |
|
|
|
minio := setting.Attachment.Minio |
|
|
|
Attachments, err = NewMinioStorage( |
|
|
|
@@ -62,6 +63,7 @@ func Init() error { |
|
|
|
minio.BasePath, |
|
|
|
minio.UseSSL, |
|
|
|
) |
|
|
|
log.Info("minio storage inited.") |
|
|
|
default: |
|
|
|
return fmt.Errorf("Unsupported attachment store type: %s", setting.Attachment.StoreType) |
|
|
|
} |
|
|
|
@@ -71,6 +73,7 @@ func Init() error { |
|
|
|
log.Error("obs.New failed:", err) |
|
|
|
return err |
|
|
|
} |
|
|
|
log.Info("obs cli inited.") |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
|