breautek commented on issue #612: URL: https://github.com/apache/cordova-plugin-file/issues/612#issuecomment-1785116563
Filesystem access to external storage since scoped storage is limited to media files, which only include Images, Videos, and Audio files. Any other type of file including document files cannot be read or written to external storage directly via the filesystem. The quirks of using this plugin with the external filesystem is documented [here](https://github.com/apache/cordova-plugin-file#androids-external-storage-quirks). In short, if you must write to the external `Downloads` directory and you're working with PDF or other document files, then you will have to migrate to a plugin that interfaces with the native `MediaStore` APIs instead. There's a [few third-party plugins](https://www.npmjs.com/search?q=ecosystem%3Acordova%20storage%20access%20framework) in the cordova ecosystem. Even if you're exclusively working with media files, migrating to a MediaStore interfaced plugin is still a good idea because external filesystem support via File APIs is completely unsupported on API 29 devices, and support was only introduced in [API 30](https://source.android.com/docs/core/storage/scoped#using-scoped-storage-with-fuse). Note that these limitations only applies to the external filesystem. If you have no need to share this document file with other apps, then you can use the app's internal filesystem (e.g. `cordova.file.dataDirectory`) to read/write and manage your document files. I'm closing this issue because because there is nothing actionable by Cordova to address this issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
