angellica.araujo
angellica.araujo

Reputation: 298

Can I use "--allow-file-access-from-files" when starting chrome app?

I am trying to load a simple .txt file content with a Chrome App (using file: protocol); I need to show its content for the user in a <div>. I need to open the file from a path typed in a input text (or defined in a string variable).

The flag --allow-file-access-from-files works fine when I load my .txt file content through Chrome browser. However, when I try to do the same with my Chrome App launcher (I have applied --allow-file-access-from-files flag on it), it keeps telling

Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

I dont know if I am missing something or if it is impossible for chrome app. My user will work with the app in Windows platform.

Upvotes: 1

Views: 1951

Answers (1)

angellica.araujo
angellica.araujo

Reputation: 298

I finally figured out that --allow-file-access-from-files does not work at all in my case.

I started coding using fileSystem and made something like the recomended in this question, following the main example. Now I am able to work with files in a directory asking the user to choose it only one time.

Upvotes: 1

Related Questions