We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa29783 + f698b5d commit a8ad545Copy full SHA for a8ad545
ctx.go
@@ -196,7 +196,7 @@ func (ctx *Ctx) Attachment(filename ...string) {
196
if len(filename) > 0 {
197
fname := filepath.Base(filename[0])
198
ctx.Type(filepath.Ext(fname))
199
- ctx.Set(HeaderContentDisposition, `attachment; filename="`+fname+`"`)
+ ctx.Set(HeaderContentDisposition, `attachment; filename="`+url.QueryEscape(fname)+`"`)
200
return
201
}
202
ctx.Set(HeaderContentDisposition, "attachment")
0 commit comments