Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Add ACL option to s3 config (#89)
Matt Steele28338916b9c0
diff --git a/config/config.go b/config/config.goindex 584c4e230b..027d76751f 100644--- a/config/config.go+++ b/config/config.go@@ -85,6 +85,7 @@ type s3 struct {Secret string `yaml:"secret"`Bucket string `yaml:"bucket"`Region string `yaml:"region"`+ ACL string `yaml:"acl"`}func (c *config) load(filePath string) error {diff --git a/core/storageproviders/s3Storage.go b/core/storageproviders/s3Storage.goindex 499e7f04c7..e6f884def6 100644--- a/core/storageproviders/s3Storage.go+++ b/core/storageproviders/s3Storage.go@@ -26,6 +26,7 @@ type S3Storage struct {s3Bucket strings3AccessKey strings3Secret string+ s3ACL string}//Setup sets up the s3 storage for saving the video to s3@@ -37,6 +38,7 @@ func (s *S3Storage) Setup() error {s.s3Bucket = config.Config.S3.Buckets.s3AccessKey = config.Config.S3.AccessKeys.s3Secret = config.Config.S3.Secret+ s.s3ACL = config.Config.S3.ACLs.sess = s.connectAWS()@@ -54,12 +56,15 @@ func (s *S3Storage) Save(filePath string, retryCount int) (string, error) {defer file.Close()uploader := s3manager.NewUploader(s.sess)-- response, err := uploader.Upload(&s3manager.UploadInput{+ uploadInput := &s3manager.UploadInput{Bucket: aws.String(s.s3Bucket), // Bucket to be usedKey: aws.String(filePath), // Name of the file to be savedBody: file, // File- })+ }+ if s.s3ACL != "" {+ uploadInput.ACL = aws.String(s.s3ACL)+ }+ response, err := uploader.Upload(uploadInput)if err != nil {log.Trace("error uploading:", err.Error())