SendFile sends a file as an attachment, that is downloaded and saved locally from client. Note that compression can be registered through `ctx.CompressWriter(true)` or `app.Use(iris.Compression)`. Use `ServeFile` if a file should be served as a page asset instead.
(src string, destName string)
| 5511 | // through `ctx.CompressWriter(true)` or `app.Use(iris.Compression)`. |
| 5512 | // Use `ServeFile` if a file should be served as a page asset instead. |
| 5513 | func (ctx *Context) SendFile(src string, destName string) error { |
| 5514 | return ctx.SendFileWithRate(src, destName, 0, 0) |
| 5515 | } |
| 5516 | |
| 5517 | // SendFileWithRate same as `SendFile` but it can throttle the speed of reading |
| 5518 | // and though writing the file to the client. |
no test coverage detected