apache / apache/cordova-plugin-file

Do not require file storage permissions at start in Chrome on browser platform

Open
#253 10 comments 2 reactions 0 assignees View on GitHub
enhancement platform: browser
Dominant language
JavaScript
Stars
744
Forks
754
Avg merge
3d 4h
Merged PRs (30d)
1

Description

Chrome with browser platform is asking for user permission at cordova start, for example :

![image](https://user-images.githubusercontent.com/139160/45829310-f00c8b80-bcfa-11e8-95d3-5f8c5e8f9bfb.png)

I don't want to store any file with cordova-plugin-file on browser platform so it should not asking for it (I think it should be asked only when needed).

It seems that the permission request come from this file : https://github.com/apache/cordova-plugin-file/blob/master/www/browser/Preparing.js
I could do a PR but I don't fully understand what is done here and why.

Contributor guide

Open the contributing guide

Research direction

Start by reading www/browser/Preparing.js and tracing why Cordova startup requests file storage permission on Chrome with the browser platform. Compare that flow with the expectation that permission is requested only when file storage is used. Done means browser startup no longer asks for this permission when the plugin is unused, while file access still requests it when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.