MCPcopy Index your code
hub / github.com/labstack/echo / contentDisposition

Method contentDisposition

context.go:720–723  ·  view source on GitHub ↗
(file, name, dispositionType string)

Source from the content-addressed store, hash-verified

718var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"")
719
720func (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.
726func (c *Context) NoContent(code int) error {

Callers 2

AttachmentMethod · 0.95
InlineMethod · 0.95

Calls 3

FileMethod · 0.95
SetMethod · 0.80
HeaderMethod · 0.45

Tested by

no test coverage detected