breautek commented on issue #565:
URL: 
https://github.com/apache/cordova-plugin-file/issues/565#issuecomment-1502278506

   > "FileError {code: 1}". 
   
   This is the error code for file not found, which may be returned by the 
underlying filesystem API even if the file exists but your app doesn't have 
permission to read it.
   
   Some files that are in external storage are not readable via filesystem APIs 
as of API 29. Also note that is obsolete (and ignored) when targeting API 30 or 
later as the scoped storage rules are enforced. Scoped storage in API 29 
devices specifically had no filesystem API, thus it is impossible to read 
external storage files using this plugin.
   
   Files that are not owned by your application usually needs to go through SAF 
(Storage Access Framework), which is a non-filesystem like API so it's not 
implemented as part of this plugin.
   
   Generally speaking this plugin works best for internal storage, or external 
storage operations where you only read/write files that you control.
   
   I don't use external storage in my apps so I don't have extensive 
experience, but if you need to access files that aren't owned by your 
application, then I'd try giving SAF plugin a try, such as 
[cordova-plugin-saf-mediastore](https://www.npmjs.com/package/cordova-plugin-saf-mediastore)
 (not an endorsement, just picked a random one from NPM search)


-- 
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]

Reply via email to