Skip to content

Commit

Permalink
fix background download when filename has ?
Browse files Browse the repository at this point in the history
  • Loading branch information
vict0rsch committed Apr 5, 2022
1 parent 85fbbdc commit 3b36460
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ chrome.runtime.onMessage.addListener((payload, sender, sendResponse) => {
saveAs: false,
});
}
chrome.downloads.download({
url: payload.pdfUrl,
filename: "PaperMemoryStore/" + payload.title,
});
let filename = "PaperMemoryStore/" + payload.title;
filename = filename.replaceAll("?", "").replaceAll(":", "");
chrome.downloads.download({ url: payload.pdfUrl, filename });
sendResponse(true);
});
}
Expand Down

0 comments on commit 3b36460

Please sign in to comment.