Package Exports
- content-disposition
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (content-disposition) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
content-disposition
Create an attachment Content-Disposition header
Installation
$ npm install content-disposition
API
var contentDisposition = require('content-disposition')
contentDisposition(filename)
Create an attachment Content-Disposition
header value using the given file name.
res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
Testing
$ npm test
References
- RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
- RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters
- RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)
- Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987