You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
If file.filename contains Chinese code or other un-standard code express will throw error:
TypeError: The header content contains invalid characters
at validateHeader (_http_outgoing.js:492:11)
at ServerResponse.setHeader (_http_outgoing.js:496:3)
So change: res.set('Content-Disposition', "attachment; filename=\"" + file.filename + "\"");
to: res.attachment(file.filename);
will correct this issue.
The text was updated successfully, but these errors were encountered:
In lib/index.js round 232 lines:
If file.filename contains Chinese code or other un-standard code express will throw error:
So change:
res.set('Content-Disposition', "attachment; filename=\"" + file.filename + "\"");
to:
res.attachment(file.filename);
will correct this issue.
The text was updated successfully, but these errors were encountered: