mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-28 01:00:59 +01:00
feat(torrent): encodeURI & decodeURI downloaded file name
This commit is contained in:
@@ -654,7 +654,7 @@ exports.attachDownload = function (req, res) {
|
||||
|
||||
try {
|
||||
//res.set('Content-Type', 'application/x-bittorrent');
|
||||
res.set('Content-Disposition', 'attachment; filename=' + req.params.filename);
|
||||
res.set('Content-Disposition', 'attachment; filename=' + encodeURI(req.params.filename));
|
||||
res.set('Content-Length', stat.size);
|
||||
|
||||
fs.createReadStream(filePath).pipe(res);
|
||||
|
||||
Reference in New Issue
Block a user