I would like to detect whether a user has access to Files/Photos when the user selects a file from <input type="file">. In mobile browser, if user has denied the photos access then nothing happens when we click the file input. In this case, I would like to alert the user that you do not have permission to access photos.
Is there any way to reliably detect if permission to access Files/Photos is currently allowed in a browser using Javascript?
I have tried Permission API and MediaDevices.getUserMedia() but it does not help as it only gives you camera permission and also it is not reliable.