MCPcopy Create free account
hub / github.com/devfeel/dotweb / contentDisposition

Method contentDisposition

context.go:461–465  ·  view source on GitHub ↗

contentDisposition set Content-disposition and response file

(file, name, dispositionType string)

Source from the content-addressed store, hash-verified

459
460// contentDisposition set Content-disposition and response file
461func (ctx *HttpContext) contentDisposition(file, name, dispositionType string) (err error) {
462 ctx.Response().SetHeader(HeaderContentDisposition, fmt.Sprintf("%s; filename=%s", dispositionType, name))
463 ctx.File(file)
464 return
465}
466
467// Bind decode req.Body or form-value to struct
468func (ctx *HttpContext) Bind(i interface{}) error {

Callers 2

AttachmentMethod · 0.95
InlineMethod · 0.95

Calls 3

ResponseMethod · 0.95
FileMethod · 0.95
SetHeaderMethod · 0.45

Tested by

no test coverage detected