contentdisposition

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2021 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Overview

Package contentdisposition attempts to correctly implement the confusing Content-Disposition header for specifying alternate filenames.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAttachment added in v0.3.2

func SetAttachment(w http.ResponseWriter, filename string)

SetAttachment is like SetFilename but it makes the browser treat the content as an attachment and present a save dialog.

func SetFilename

func SetFilename(w http.ResponseWriter, filename string)

SetFilename adds a Content-Disposition header to the response to set an alternate filename. It probably has proper formatting and non-ASCII character support, as described by RFC 2616 and RFC 5987.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL