Attachment
Sets the HTTP response Content-Disposition header field to attachment
.
func (c *Ctx) Attachment(filename ...string)
app.Get("/", func(c *fiber.Ctx) error {
c.Attachment()
// => Content-Disposition: attachment
c.Attachment("./upload/images/logo.png")
// => Content-Disposition: attachment; filename="logo.png"
// => Content-Type: image/png
// ...
})