Skip to content

Commit 540b1ef

Browse files
authored
update content-disposition header to MIME-style (#2512)
1 parent 3100b7c commit 540b1ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

context.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ func (c *Context) FileFromFS(filepath string, fs http.FileSystem) {
987987
// FileAttachment writes the specified file into the body stream in an efficient way
988988
// On the client side, the file will typically be downloaded with the given filename
989989
func (c *Context) FileAttachment(filepath, filename string) {
990-
c.Writer.Header().Set("content-disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
990+
c.Writer.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
991991
http.ServeFile(c.Writer, c.Request, filepath)
992992
}
993993

0 commit comments

Comments
 (0)