Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70817

Filesystem.requestPermissions() doesn't work!

$
0
0

Hi all,

I want to let user download a created image to local, but if user accidentally click the wrong button “deny”, then next time, the image won’t be downloaded. To avoid this, I want to let my program ask the user every time which the the write permission is denied, then it will prompt a query to let user allow the write permission.

I tried the following code:

    let permission = await Filesystem.checkPermissions()

    if (permission.publicStorage !== "granted") {

      permission = await Filesystem.requestPermissions() // Why this doesn't work????

      if (permission.publicStorage !== "granted") {
        return
      }
    }

However, this function await Filesystem.requestPermissions() doesn’t work at all, it didn’t prompt anything…

Do you have any idea about it?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>