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

Method Inline

context.go:714–716  ·  view source on GitHub ↗

Inline sends a response as inline, opening the file in the browser. Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for file operations.

(file, name string)

Source from the content-addressed store, hash-verified

712// Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for
713// file operations.
714func (c *Context) Inline(file, name string) error {
715 return c.contentDisposition(file, name, "inline")
716}
717
718var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"")
719

Callers 1

TestContextInlineFunction · 0.95

Calls 1

contentDispositionMethod · 0.95

Tested by 1

TestContextInlineFunction · 0.76