0
我一直試圖將這個Chrome代碼與chooseEntry類型作爲'openDirectory'使用,但我認爲它還沒有實現,所以我想知道是否已經有其他方式來做到這一點。有沒有辦法讓用戶在Chrome上選擇一個文件夾?
manifest.json的:
"permissions": [
"notifications",
{"fileSystem": ["write", "directory"]}
],
的Javascript:
chrome.fileSystem.chooseEntry({type:'openDirectory'},function(userDirEntry){
/*fill with files*/
});
這就是我得到:
> Uncaught Error: Invalid value for argument 1. Property 'type': Value must be one of: [openFile, openWritableFile, saveFile].
好的,謝謝你,我正在嘗試做「權限」:{「fileSystem」:[「write」,「directory」]},這是給我一個錯誤,但無論如何都不工作,這就是爲什麼我這樣離開它。非常感謝你。 – shuji