I have a React useEffect
hook that will read local files previously approved by the user.
To read the files, it uses the [FileSystemHandle.queryPermission()][1]
method, which if not granted
will prompt the user for access using the FileSystemHandle.requestPermission()
method.
The problem is that this happens before the user has a chance to interact with the page, which causes the DOMException: User activation is required to request permissions.
error.
Is there any way around this?