Skip to content

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

@delebash

Description

@delebash

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions