Skip to content

Commit

Permalink
update content-disposition header to MIME-style (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
eudore committed Sep 25, 2020
1 parent 3100b7c commit 540b1ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Expand Up @@ -987,7 +987,7 @@ func (c *Context) FileFromFS(filepath string, fs http.FileSystem) {
// FileAttachment writes the specified file into the body stream in an efficient way
// On the client side, the file will typically be downloaded with the given filename
func (c *Context) FileAttachment(filepath, filename string) {
c.Writer.Header().Set("content-disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
c.Writer.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
http.ServeFile(c.Writer, c.Request, filepath)
}

Expand Down

0 comments on commit 540b1ef

Please sign in to comment.