Local file access with JavaScript

前端 未结 13 2543
悲哀的现实
悲哀的现实 2020-11-21 04:07

Is there local file manipulation that\'s been done with JavaScript? I\'m looking for a solution that can be accomplished with no install footprint like requiring Adobe AIR.<

13条回答
  •  北恋
    北恋 (楼主)
    2020-11-21 05:06

    UPDATE This feature is removed since Firefox 17 (see https://bugzilla.mozilla.org/show_bug.cgi?id=546848).


    On Firefox you (the programmer) can do this from within a JavaScript file:

    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
    

    and you (the browser user) will be prompted to allow access. (for Firefox you just need to do this once every time the browser is started)

    If the browser user is someone else, they have to grant permission.

提交回复
热议问题