0

My objective is to load files from the users computers and use those to customize the New Tab page, however if I try and access the fileSystem permissions I get the following error

'fileSystem' is only allowed for packaged apps, but this is a extension

and if I format my manifest.json as an app (per these instructions) then I get the following error

chrome_url_overrides' is only allowed for extensions and legacy packaged apps, but this is a packaged app.

Based on the errors it seems these two concepts (new tab override and accessing file system) are structurally incompatible, it feels like something that should be able to be done so I just thought I'd check and see if anyone knows of a way around this.

Josh McGee
  • 443
  • 6
  • 16
  • 1
    There's no way around this, it's not bendable, but you can use standard file uploads, the upcoming Native File System API, or go nuclear and use [nativeMessaging](https://developer.chrome.com/extensions/nativeMessaging) with an external utility that can access the file system. P.S. if you allow file access on chrome://extensions page for your extension it'll be able to read the file:// URLs directly in XMLHttpRequest. – wOxxOm Jun 18 '20 at 09:57
  • thanks, a workaround like nativeMessaging seems like just what I'm after – Josh McGee Jun 18 '20 at 10:47
  • it's not the answer to the problem I posed, but for reference my solution for now is to host a node.js server and make fetch() requests to server. I can store the files there rather than on the user's computer. – Josh McGee Jun 19 '20 at 05:54

0 Answers0