breautek commented on issue #613: URL: https://github.com/apache/cordova-plugin-file/issues/613#issuecomment-1934886410
> Hi, > > After reviewing the previous discussions on this topic, I find myself in agreement with Mr. Anonymous. It appears that the solution remains unclear. Despite adding READ_MEDIA_* permissions to my config.xml, my app fails to execute the desired action, specifically downloading a PDF file. > > In my code, I use cordova.file.externalRootDirectory + Download (file:///storage/emulated/0/Download). While this approach functions as intended on devices running Android 11, it encounters issues on those running Android 13. Consequently, I'm left wondering whether it's feasible to download files to the specified folder. > > I attempted using cordova.file.externalDataDirectory + Download, which yielded partial success. This method opens the file with a PDF viewer, facilitating the download to the Download folder. However, I observed that when using this directory, the file is located in a folder structure resembling file:///data/user/0/app/files/Download. This behavior deviates from my expectations and could potentially complicate the file retrieval process for end-users. A PDF is a document file and android lacks a permission system for document files. They only have _MEDIA, _VIDEO, and _AUDIO for reads. Additionally there is no permissions for writes. More details on this is now [documented](https://github.com/apache/cordova-plugin-file?tab=readme-ov-file#androids-external-storage-quirks) but if you're working with document files and require to use the external filesystem, then migrating to a [MediaStore](https://www.npmjs.com/search?q=ecosystem%3Acordova%20storage%20access%20framework) plugin will probably become necessary. -- 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: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org