You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
411 B
24 lines
411 B
package core |
|
|
|
import ( |
|
"github.com/owncast/owncast/core/data" |
|
"github.com/owncast/owncast/core/storageproviders" |
|
) |
|
|
|
func setupStorage() error { |
|
s3Config := data.GetS3Config() |
|
|
|
if s3Config.Enabled { |
|
_storage = storageproviders.NewS3Storage() |
|
} else { |
|
_storage = storageproviders.NewLocalStorage() |
|
} |
|
|
|
if err := _storage.Setup(); err != nil { |
|
return err |
|
} |
|
|
|
handler.Storage = _storage |
|
|
|
return nil |
|
}
|
|
|