如何通过chrome api设置下载位置 [英] How to set download location via chrome api
问题描述
我正在使用chrome.experimental.downloads.download()下载url,但我不能设置下载位置。所有的网址都下载到Chrome的默认位置。
我累了{url:xxxxxxxxxx,文件名\file\pic.jpg}, t work.I不知道如何使用chrome.experimental.downloads.setDestination()哪些工作。
任何提示?
谢谢〜
您目前无法设置目的地,它不是可用的功能API。我能找到的 setDestination
中唯一提到的就是这个扩展中的一个旧的Chromium票据,但似乎这个功能或者从未进入到当前的构建中,或者仍然存在从事。
您现在唯一可以做的事情是在选项对象中将 saveAs
设置为true并让用户选择在哪里保存它。
更新:我刚刚检查了Chrome源代码,并在当前的中继版本中将 setDestination
标记为 NOTIMPLEMENTED
,所以没有那个喜悦。
I am using chrome.experimental.downloads.download() to download url, but I cannnot set downloads location. All the url downloaded to default location of chrome.
I have tired {url: xxxxxxxxxx, filename"\file\pic.jpg"}, but that didn't work.I don't known how to use chrome.experimental.downloads.setDestination() which might work.
Any hints?
Thanks~
You currently cannot set the destination, it's not a function that is available in the API. The only mention I can find of setDestination
is in an old Chromium ticket on this extension, but it seems that this functionality either never made it in to the current builds or is still being worked on.
The only thing you can do for now is set saveAs
to true in the options object and let the user choose where to save it.
Update: I just checked the Chrome source code and in the current trunk version setDestination
is marked as NOTIMPLEMENTED
, so no joy on that one.
这篇关于如何通过chrome api设置下载位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!