|
|
|
|
@ -4,12 +4,11 @@ import (
@@ -4,12 +4,11 @@ import (
|
|
|
|
|
"bytes" |
|
|
|
|
"io" |
|
|
|
|
"net" |
|
|
|
|
"net/http" |
|
|
|
|
"os" |
|
|
|
|
"path/filepath" |
|
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
"net/http" |
|
|
|
|
|
|
|
|
|
"github.com/owncast/owncast/config" |
|
|
|
|
"github.com/owncast/owncast/utils" |
|
|
|
|
log "github.com/sirupsen/logrus" |
|
|
|
|
@ -67,7 +66,7 @@ func (s *FileWriterReceiverService) uploadHandler(w http.ResponseWriter, r *http
@@ -67,7 +66,7 @@ func (s *FileWriterReceiverService) uploadHandler(w http.ResponseWriter, r *http
|
|
|
|
|
_, _ = io.Copy(&buf, r.Body) |
|
|
|
|
data := buf.Bytes() |
|
|
|
|
|
|
|
|
|
f, err := os.Create(writePath) |
|
|
|
|
f, err := os.Create(writePath) //nolint: gosec
|
|
|
|
|
if err != nil { |
|
|
|
|
returnError(err, w) |
|
|
|
|
return |
|
|
|
|
|