(file, name, dispositionType string)
| 718 | var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"") |
| 719 | |
| 720 | func (c *Context) contentDisposition(file, name, dispositionType string) error { |
| 721 | c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf(`%s; filename="%s"`, dispositionType, quoteEscaper.Replace(name))) |
| 722 | return c.File(file) |
| 723 | } |
| 724 | |
| 725 | // NoContent sends a response with no body and a status code. |
| 726 | func (c *Context) NoContent(code int) error { |
no test coverage detected