I am developing a chrome extensions and I need to download file in specific path, i'm using chrome.download in background.js
chrome.downloads.download({
url: request.url,
filename: "teste.txt", // Optional
saveAs: false,
});
But, in this way, I have to choice the path in modal of download, but i need to define a specific path for download all files of this extensions!
How can I do it ?
Manifest:
"version": "1",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["jquery.js", "content.js"]
}],
"permissions": ["tabs", "browsingData", "activeTab", "downloads", "fileSystem"]