Skip to content

Commit

Permalink
Merge pull request #15 from xmx/master
Browse files Browse the repository at this point in the history
use mime.FormatMediaType to format Content-Disposition
  • Loading branch information
xgfone committed Dec 13, 2022
2 parents 433e663 + 8c33cc2 commit 405a71d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ func (c *Context) contentDisposition(file, name, dispositionType string) error {
name = filepath.Base(file)
}

params := map[string]string{"filename*": "utf-8''" + name}
params := map[string]string{"filename": name}
disposition := mime.FormatMediaType(dispositionType, params)
c.res.Header().Set(HeaderContentDisposition, disposition)
return c.File(file)
Expand Down

0 comments on commit 405a71d

Please sign in to comment.