Documentation
¶
Overview ¶
Package disposition builds safe Content-Disposition attachment headers for client-facing download names (export and web.Ctx.Download).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attachment ¶
Attachment returns an RFC 6266 attachment header for filename, sanitized by Sanitize. Non-ASCII names get an ASCII filename plus an RFC 5987 filename*.
func Sanitize ¶
Sanitize returns a download-safe name: the last path element (either separator), without control (C0, C1, U+2028/2029) and format (bidi, zero-width) characters, with Windows-forbidden characters as "_", no leading dots, no trailing dots or spaces, a "_" before Windows device names, at most 200 characters keeping the extension; "download" when nothing is left.
Types ¶
This section is empty.