Replies: 1 comment
-
|
I modified PlatformFile.Companion.fromBookmarkData on Android to check if the file exists before returning it. If not, it throws a FileKitException. On iOS, the check is already present and also throws FileKitException if the bookmark is not retrieved. I tested on both platforms and it looks good now 👌 It will be out in the next release. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In android, even if the file uri persistent access is taken, unlike iOS it will not point to the same file if it is moved in android. If a file, which is picked either from SAF, or provided by others apps to handle the file will anyways expire at any point of time in android. So an expired (Means file is moved or deleted or revoked access) uri, on accessing cause either SecurityException or similar one.
A URI/Bookmark will get invalid if
Anyways a check is always good before accessing. So my suggestion is to check on converting the bookmark back to PlatformFile and throw an exception if not accessible.
Beta Was this translation helpful? Give feedback.
All reactions