Encode uploaded torrent filenames

This commit is contained in:
John Furrow
2016-12-08 06:06:58 -08:00
parent 0122a04081
commit 12efa5cf24
+1 -1
View File
@@ -36,7 +36,7 @@ var client = {
// filesize of 524 kilobytes or less. This allows the user to send many
// torrent files reliably.
files.forEach((file, index) => {
file.originalname = file.originalname.replace(/\s+/g, '.');
file.originalname = encodeURIComponent(file.originalname);
let fileRequest = new ClientRequest();
fileRequest.addFiles({files: file, path, start});