How do I get the checkbox “Allow access to file URLs” to show up next to my app? I have file write permissions in manifest

时间秒杀一切 提交于 2019-12-06 02:44:37

问题


More Info/Update

I packaged and installed google's own sample app showing filesystem access and it also does not show the checkbox!

You can find it here: https://github.com/GoogleChrome/chrome-app-samples/tree/master/filesystem-access

Original Post

I have the permission asking for filesystem.write ability in my manifest but on the chrome://extensions page, the check box doesn't show up. And when I click "permissions" next to my app's icon, it only shows:

"Write to files that you have opened in the application"

What am I doing wrong? (This is a hosted app)

manifest.json

{
    "manifest_version": 2,
    "name": "Hello World",
    "description": "A test application",
    "version": "2.0.3.92",
    "minimum_chrome_version": "23",
    "offline_enabled": true,
    "update_url": "http://mywebsite.com/updates/helloworld.xml",
    "icons": 
    {
        "16": "icon_16.png",
        "128": "icon_128.png"
    },
    "app": 
    {
        "background": 
        {
            "scripts": 
            [
                "utils.js",
                "fs.js",
                "main.js"
            ]
        }
    },
    "permissions": 
    [
        "unlimitedStorage",
        "fullscreen",
        {
            "fileSystem": 
            [
                "write"
            ]
        },
        "background",
        "http://*/",
        "tabs"
    ]
}

回答1:


To get this to work you need either:

permissions: [ "<all_urls>" ]

or a scheme starting with file:///.

If you try *://*/* that will not work as it only represents http or https



来源:https://stackoverflow.com/questions/17181181/how-do-i-get-the-checkbox-allow-access-to-file-urls-to-show-up-next-to-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!