Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Return error when data not found in logo upload API

Gabe Kangasf52da2f88ecf
diff --git a/controllers/admin/config.go b/controllers/admin/config.go
index 84b98e78c2..78077a2389 100644
--- a/controllers/admin/config.go
+++ b/controllers/admin/config.go
@@ -227,7 +227,12 @@ func SetLogo(w http.ResponseWriter, r *http.Request) {
return
}
- bytes, extension, err := utils.DecodeBase64Image(configValue.Value.(string))
+ value, ok := configValue.Value.(string)
+ if !ok {
+ controllers.WriteSimpleResponse(w, false, "unable to find image data")
+ return
+ }
+ bytes, extension, err := utils.DecodeBase64Image(value)
if err != nil {
controllers.WriteSimpleResponse(w, false, err.Error())
return