Chrome extension chrome.downloads.download saves the picture can not change the file name and subpath how is it?

is working on a chrome extension tool to grab web images and save them locally. Use the chrome.downloads.download this API, parameter to set as follows:

chrome.downloads.download({
      url: url, // url
      filename: dir, // +
      saveAs: false,
      conflictAction: "uniquify"
    }, function(t) {})

you want to save the renamed file to a subfolder in the local download folder. But it can be done on one mac machine, but not on another mac (it can only be saved by the original file name, and no subpaths can be added).

find a solution!

Menu