Access local files from HTML5 Desktop Application in html folder

前端 未结 2 1274
醉话见心
醉话见心 2021-01-12 15:21

HTML5 is great and I can replace my existing desktop application with it, but just a little security restriction prevents me to complete my job. I plan to create a simple de

相关标签:
2条回答
  • 2021-01-12 15:54

    If you need that file so much, why not just load it dynamically inside a JS script as a json object.

    So, in other words, put the contents of the file into a js script, and strucutre the file contents into JSON format, then load that script on load or when you require it.

    Alternately if you need file IO use localstorage.

    0 讨论(0)
  • 2021-01-12 15:59

    according to this site, launching chrome from the cmd with the parameter --allow-file-access-from-files will disable this security feature

    0 讨论(0)
提交回复
热议问题