kt_at_kt
kt_at_kt

Reputation: 343

Use rn-fetch-blob with android Storage Access Framework

I am using rn-fetch-blob to download photos and want them to be stored in external sd card. While I always get 'permission denied' even I have set android.permission.WRITE_EXTERNAL_STORAGE in AndroidManifest.xml and have ask permission request by PermissionsAndroid.request I still get the permission error.

After I searched on here and finally found the issue may be due to this answer. However I don't know how to combine the Storage Access Framework with rn-fetch-blob.

So I would like to download photos by using rn-fetch-blob and stored them to sd card (path will like /storage/6265-6530/DCIM/Camera/)

Anyone help? Thanks

Upvotes: 1

Views: 1259

Answers (1)

As you did not provide any code for reference it is hard to see what is happening. Perhaps the problem is misspelling a character in the file path. To avoid this kind of thing you can use rn-fetch-blob constants. Another option is to use react-native-fs module, it offers a constant that maps to external storage.

Upvotes: 1

Related Questions