GitHub user breautek added a comment to the discussion: Cordova Plugin File doesn't work on Android 13
Android's external file system is now quite limiting and doesn't allow direct file access via file APIs for all files anymore. It does allow for media files such as images, videos, audio. For other file types, the native MediaStore API needs to be used, which the file plugin does not use (and it's not really a file API so it's going to be hard to facade it to make it look like a file API). > Remember, this works fine on others versions, like Android 11 or below. > Android 12 I haven't tested yet, but it seems to work ! This wouldn't have worked since Scoped Storage, which was introduced in API 29, but existing apps could opt out and revert back to legacy filesystem. Starting API 30, the scoped storage is fully enforced. The short answer, if you need external storage access, you'd be probably better off using a plugin that actually interfaces with the native MediaStore API such as [cordova-plugin-saf-mediastore](https://www.npmjs.com/package/cordova-plugin-saf-mediastore) (not an endorsement, never used it myself, and you may want to check the license cause it's not a license I'm familiar with). The filesystem works well with internal storage (e.g. apps own data directory). I'm not sure if the filesystem plugin can be updated to use the MediaStore API while keeping it's old API signature, so support for external storage may just drop entirely altogether. These are my own thoughts however, and this hasn't been brought up for a community discussion yet on the mailing list. GitHub link: https://github.com/apache/cordova/discussions/424#discussioncomment-6415539 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
