Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local filesystem access in browser extensions

I'm doing some investigation into options for an app I am building. Do browser extensions for all browser platforms have filesystem access like Firefox does?

like image 401
Travis Jensen Avatar asked Apr 12 '11 20:04

Travis Jensen


People also ask

Can a Chrome extension access local files?

For security reasons, by default the Chrome browser does not allow extensions to access local files. If you want the accelerator to access local files (locations of "file:///...", instead of "http://" or "https://"), you must configure Chrome to allow the access.

Can a browser access filesystem?

Web browsers (and JavaScript) can only access local files with user permission. To standardize the file access from the browser, the W3C published the HTML5 File API in 2014. It defines how to access and upload local files with file objects in web applications.


1 Answers

Chrome extensions do not allow arbitrary filesystem access. You could, however, write an NPAPI plugin, but this comes with some heavy caveats:

You can also use HTML5 filesystem APIs to access a sandboxed filesystem:

like image 114
Boris Smus Avatar answered Oct 27 '22 00:10

Boris Smus