remove global variables from core/storageproviders (#1444)

This commit is contained in:
Tim Cooper
2021-10-11 18:29:36 -05:00
committed by GitHub
parent 8098304967
commit 9a912d5385
3 changed files with 28 additions and 17 deletions

View File

@@ -9,9 +9,9 @@ func setupStorage() error {
s3Config := data.GetS3Config()
if s3Config.Enabled {
_storage = &storageproviders.S3Storage{}
_storage = storageproviders.NewS3Storage()
} else {
_storage = &storageproviders.LocalStorage{}
_storage = storageproviders.NewLocalStorage()
}
if err := _storage.Setup(); err != nil {