NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #242 most downloaded on npm
Create and parse Content-Disposition header
Last release 1 months ago
13 Aug 2026
Release timing varies
gaps range from 2 weeks to 3.0 years
Most releases are documented
notes for 16 of 18 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
18 releases · first in 2014
This release switches to ESM only.
This release switches to ESM only.
Changed
format with extended: true but including both param and param*, it now ignores param and uses param* when it would otherwise encode. The behavior of extended: false is the same as before, both params will be included.One column per quarter.
Large refactor to make the parser 3x faster and lenient on input. Removes the default export and renames it to create .
Large refactor to make the parser 3x faster and lenient on input. Removes the default export and renames it to create.
import { create, parse, format } from 'content-disposition';
create('filename');
parse(
'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt',
);
format({
type: 'attachment',
parameters: {
filename: '€ rates.txt',
},
});Adds a multipart option that can be used to parse the header within multipart/form-data appropriately.
Note: The filename in create is no longer normalized with basename, ensure you are using appropriate filenames and not exposing your directory structure by using absolute paths.
Changed
create export insteadbasename from create, pass a filename instead of a full pathcreate to ASCII only (#132) 3190b76Added
format method (#129) 2bb7da3Make the package usable in all JavaScript environments
Changed
Remove dependency safe-buffer by @Phillip9587 in https://github.com/jshttp/content-disposition/pull/53
safe-buffer by @Phillip9587 in https://github.com/jshttp/content-disposition/pull/53mocha and nyc with native node test runner and c8 by @Phillip9587 in https://github.com/jshttp/content-disposition/pull/54Full Changelog: https://github.com/jshttp/content-disposition/compare/v1.0.0...v1.0.1
safe-buffer by @Phillip9587 in #53mocha and nyc with native node test runner and c8 by @Phillip9587 in #54Full Changelog: v1.0.0...v1.0.1
Replace deprecated String.prototype.substr() by @CommanderRoot in https://github.com/jshttp/content-disposition/pull/42
Full Changelog: https://github.com/jshttp/content-disposition/compare/v0.5.4...v1.0.0
Full Changelog: v0.5.4...v1.0.0
deps: safe-buffer@5.2.1
Use safe-buffer for improved Buffer API
safe-buffer for improved Buffer APIFix parse to accept any linear whitespace character
parse to accept any linear whitespace characterperf: enable strict mode
Nothing published for this version
Expand non-Unicode filename to the full ISO-8859-1 charset
filename to the full ISO-8859-1 charset- Add fallback option - Add type option
fallback optiontype optionReduce ambiguity of file names with hex escape in buggy browsers
Fix periodic invalid Unicode filename header
Fix invalid characters appearing in filename* parameter
filename* parameterMake the filename argument optional
filename argument optionalNothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →