content-disposition
3.0.0 · 13 Aug 2026MIT211.4M / weekRepositoryHomepagenpmAtom feed
18 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 3.x · latest line
3.0.0
13 Aug 2026Export package as ESM (#141)
Reject invalid percent-encoding in ISO-8859-1 ext-value (#138)
Skip duplicate parameter in extended format (#144)
This release switches to ESM only.
Changed
Export package as ESM (#141)
Reject invalid percent-encoding in ISO-8859-1 ext-value (#138)
Skip duplicate parameter in extended format (#144)
If you were previously using
formatwithextended: truebut including bothparamandparam*, it now ignoresparamand usesparam*when it would otherwise encode. The behavior ofextended: falseis the same as before, both params will be included.
- 2.x
2.0.0
11 May 2026Removed
basenamefromcreate, pass a filename instead of a full pathRefactor parser to be faster and lenient (e.g. now parses unicode)
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
multipartoption that can be used to parse the header withinmultipart/form-dataappropriately.Note: The filename in
createis no longer normalized withbasename, ensure you are using appropriate filenames and not exposing your directory structure by using absolute paths.Changed
No default export, use
createexport instead
Removed
basenamefromcreate, pass a filename instead of a full pathRefactor parser to be faster and lenient (e.g. now parses unicode)
Remove fallback behavior from decoder (#127) 7086236
Invalid UTF-8 is no longer supported
Added
- 1.x
1.0.1
18 Nov 2025- breaking
Update package.json engines field to reflect minimum supported node version
Remove dependency
safe-bufferFix badges
What's Changed
Remove dependency
safe-buffer- breaking
Update package.json engines field to reflect minimum supported node version
Fix badges
Replace var with const in example code
Replace
mochaandnycwith native node test runner andc8
1.0.0
31 Aug 2024- 0.5.x
0.5.4
10 Dec 2021Only updates a dependency:safe-buffer 5.2.1
0.5.3
17 Dec 2018Use
safe-bufferfor improved Buffer API
0.5.2
9 Dec 2016Fix
parseto accept any linear whitespace character
0.5.1
17 Jan 2016Enable strict mode
0.5.0
11 Oct 2014Add
parsefunction
- 0.4.x
0.4.0
11 Oct 2014Expand non-Unicode
filenameto the full ISO-8859-1 charset
- 0.3.x
0.3.0
21 Sep 2014Add
fallbackoptionAdd
typeoption
- 0.2.x
0.2.0
20 Sep 2014Reduce ambiguity of file names with hex escape in buggy browsers
- 0.1.x
0.1.2
20 Sep 2014Fix periodic invalid Unicode filename header
0.1.1
19 Sep 2014Fix invalid characters appearing in
filename*parameter
0.1.0
19 Sep 2014Make the
filenameargument optional
- 0.0.x
0.0.0
19 Sep 2014Initial release