Closed jlucaspains closed 4 years ago
Thanks for the contribution. I liked your first commit better, since it skips calling IOUtil.GetPath()
altogether. And could you please add a comment why the URI isn't tried to be resolved on Android Q and later? Doesn't need to be much text... Thanks!
Easy! I will do it later today and push another commit.
@jfversluis Looks good to me, I think you can merge this. Couldn't actually test, since I'm on vacation.
Beta version is here: https://www.nuget.org/packages/Xamarin.Plugin.FilePicker/2.1.44-beta
Let me know how it goes
I just tried with the packaged version and it worked well in my project. Perhaps @IngweLand can test it as well?
Description of Change
On Android Q (10) the File Path returned on a file pick may refer to an external location like the Downloads folder. Upon trying to read the file, a System.UnauthorizedAccessException is thrown. This change will use the original content URI and content resolver to load the file instead of File.OpenRead.
Issues Resolved
Platforms Affected