Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How did you get it not to ask for permission on already granted folder? #36

Open
delebash opened this issue Sep 22, 2021 · 0 comments
Open

Comments

@delebash
Copy link

I have read your article on this. Thanks for that! I have tried to follow the sample but when a user selects a folder that they have already been granted access but it still asks for permission.

Simple code example -- as in your example get and set are shorthand for getting and setting values to indexDb using idb-keyval

asyn function (){
 let dirHandle = await get("directory");
 dirHandle = await window.showDirectoryPicker();
  await set("directory", dirHandle);
}

Expected results:
Every time a user picks a folder it should not ask for permission on subsequent calls even after page refresh since I am storing and retrieving dirHande from indexDb which should give me permissions already saved. I doing a page refresh for testing immediately so should not have to reverify permissions. Although I will add that check according to your article.

Thanks.
Dan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant