From 05de6083f66fa1b81b982d360dc9e955305e33fc Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Jacquier Date: Wed, 27 Feb 2019 13:18:01 +0100 Subject: [PATCH] Fixe file type Signed-off-by: Pierre-Emmanuel Jacquier --- pkg/routes/routes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index fef4639..4918ac4 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -77,5 +77,6 @@ func (p *proxy) getM3U(c *gin.Context) { c.AbortWithError(http.StatusInternalServerError, err) return } - c.Data(http.StatusOK, "text/plain", []byte(result)) + c.Header("Content-Disposition", "attachment; filename=\"iptv.m3u\"") + c.Data(http.StatusOK, "application/octet-stream", []byte(result)) }