diff --git a/pkg/handlers/initiate.go b/pkg/handlers/initiate.go index 5d0f6e4..d6794cf 100644 --- a/pkg/handlers/initiate.go +++ b/pkg/handlers/initiate.go @@ -65,6 +65,9 @@ func HandleInitiate(c *gin.Context) { return } + if req.Type == "" { + req.Type = "binary/octet-stream" + } if _, _, err := mime.ParseMediaType(req.Type); err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": "invalid type"}) return