How to upload external images to a Chrome app?

1

My application uses Imgur's api to host images, but at the time it will load the photos, the following error appears:

Ihavealreadytriedtousecontent_security_policyinthemanifestfilebutthismessageappears:

What to do?

    
asked by anonymous 21.03.2014 / 19:59

2 answers

2

If I'm not mistaken, it's only possible to include urls that have https, I've already created a chrome extension to calculate Race Rhythm that can be seen mo link

You can also try to add the permission in the manifest:

    "content_security_policy": "script-src 'self' https://i.imgur.com 'unsafe-eval'; object-src 'self'"
    
21.03.2014 / 20:19
2

Try updating the application manifest.json with the url you want to access.

"permissions": ["storage", "webview", "<all_urls>"]

The <all_urls> has the same effect as http://*/* or https://*/* or *://*/* . (Access your data on all websites).

You can try using the webview permission too:

  

Use the webview tag to actively load live content from the web over   the network and embed it in your Chrome App.

If you have any questions about permissions warnings, go to:

link

    
21.03.2014 / 20:15