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.
22 lines
379 B
22 lines
379 B
package core |
|
|
|
import ( |
|
"github.com/owncast/owncast/config" |
|
"github.com/owncast/owncast/core/storageproviders" |
|
) |
|
|
|
func setupStorage() error { |
|
handler.Storage = _storage |
|
|
|
if config.Config.S3.Enabled { |
|
_storage = &storageproviders.S3Storage{} |
|
} else { |
|
_storage = &storageproviders.LocalStorage{} |
|
} |
|
|
|
if err := _storage.Setup(); err != nil { |
|
return err |
|
} |
|
|
|
return nil |
|
}
|
|
|