escapeHeaderFilename
escapeHeaderFilename(
filename):string
Defined in: multipart.ts:53
Escape a filename for inclusion in a Content-Disposition header.
Applies the same normalization the WHATWG FormData serializer does. Without it, a file named
my"file.pdf would close the quoted string early, and one containing a newline could inject a
header. The form-data package this replaced did neither.
Parameters
Section titled “Parameters”filename
Section titled “filename”string
The raw filename.
Returns
Section titled “Returns”string
The filename with ", CR, and LF percent-encoded.