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