Mobile browser 'Files and media' permission status

Viewed 573

My problem is quite simple.

I have a simple input for files (especially images) in a page.

<input type='file' accept='image/*'/>

When a mobile user browses the page from, let's say Chrome, if he previously denied the permission to access "Files and media", if the user clicks on the input, nothing happens.

This is quite annoying for the user experience. I do understand that I can't bypass the security, although, it would be really cool to be able to check the permission, at least, to explain to the user what he needs to do in order to use the feature.

I found this: https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query but the list of permissions does not contain anything related to the "Files and media" permission...

Is there anyway to check this permission? To be able to prompt the user for it would be great, but at least, my priority is to know what is the permission's status from JavaScript to explain to the user why it does nothing.

Thank you!

0 Answers
Related