https://github.com/gin-gonic/gin/blob/6a0556ed5a67d1d12ae3e7ea2c0121b6c3b894e2/context.go#L1055-L1064
filename format funtion can try using mime.FormatMediaType
:
func (c *Context) FileAttachment(filepath, filename string) {
disposition := mime.FormatMediaType("attachment", map[string]string{"filename": filename})
c.Writer.Header().Set("Content-Disposition", disposition)
http.ServeFile(c.Writer, c.Request, filepath)
}
Comment From: ss893
When can we expect this to be solved
Comment From: thinkerou
v1.9.1 have released, please see https://github.com/gin-gonic/gin/releases/tag/v1.9.1, thanks!