Attachment sends a response as attachment, prompting client to save the file. for issue #39
(file, name string)
| 447 | // Attachment sends a response as attachment, prompting client to save the file. |
| 448 | // for issue #39 |
| 449 | func (ctx *HttpContext) Attachment(file, name string) (err error) { |
| 450 | return ctx.contentDisposition(file, name, "attachment") |
| 451 | } |
| 452 | |
| 453 | // Inline sends a response as inline, opening the file in the browser. |
| 454 | // if file not exists, response 404 |
nothing calls this directly
no test coverage detected