Description
Ok, first off: I understand this isn't a common use case, but, in my opinion, it should still work. That said, if I use FilePicker.PickMultipleAsync to select a plethora of files in a folder (say, 200 - and they can be super tiny text files), I experience the following behavior:
Windows: after you click OK, you'll be waiting a very long time for the file results to get returned. Like, close to a minute (even in Release).
iOS: if you try and open one of the returned files, you can get an UnauthorizedAccessException. I typically find this happens with about 200 files, though sometimes it's more. In my testing it can be as low as 180. Sometimes 250+. But it will happen if you select enough. If you only select a few, then it works fine. And sidebar: sometimes I swear I tap 'Open' on iOS with files selected, but then it says no files were picked. If I try again it works.
I made a repo here that can be used to reproduce the problem: https://github.com/whodges/mauifilepicker.git. I also included a CreateTestTextFiles utility method that will make 1000 tiny text files in a specified folder that you can subsequently select via the FilePicker when the app is run. I created them on Windows, then moved them to my MacBook and subsequently to my iPhone (which is an iPhone 14 Pro, btw).
Steps to Reproduce
- Get and run the MauiFilePicker app from my repo. Notice in
MainPage.OnOpenClickedAsync I have call to CreateTestTextFiles that's commented out; uncomment it for your first run (updating TestTextFileFolder to whatever you want it to be) to make a bunch of tiny files to select via FilePicker.
- When the app's run, clicked its 'Open Files...' button, and select all or a subset of said text files (pick at least 250).
- At this point, the app will get the results and then try and open and close each file. If you only picked a few files, everything is fine. If you pick a lot, Windows will take a very long time to return the selection results (this is prior to opening and closing each file), while iOS will likely choke with an
UnauthorizedAccessException.
Link to public reproduction project repository
https://github.com/whodges/mauifilepicker.git
Version with bug
8.0.5
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Windows
Affected platform versions
iOS 17.1.2, Windows 10.0.1.19045
Did you find any workaround?
Nope.
Relevant log output
No response
Description
Ok, first off: I understand this isn't a common use case, but, in my opinion, it should still work. That said, if I use
FilePicker.PickMultipleAsyncto select a plethora of files in a folder (say, 200 - and they can be super tiny text files), I experience the following behavior:Windows: after you click OK, you'll be waiting a very long time for the file results to get returned. Like, close to a minute (even in Release).
iOS: if you try and open one of the returned files, you can get an
UnauthorizedAccessException. I typically find this happens with about 200 files, though sometimes it's more. In my testing it can be as low as 180. Sometimes 250+. But it will happen if you select enough. If you only select a few, then it works fine. And sidebar: sometimes I swear I tap 'Open' on iOS with files selected, but then it says no files were picked. If I try again it works.I made a repo here that can be used to reproduce the problem: https://github.com/whodges/mauifilepicker.git. I also included a
CreateTestTextFilesutility method that will make 1000 tiny text files in a specified folder that you can subsequently select via theFilePickerwhen the app is run. I created them on Windows, then moved them to my MacBook and subsequently to my iPhone (which is an iPhone 14 Pro, btw).Steps to Reproduce
MainPage.OnOpenClickedAsyncI have call toCreateTestTextFilesthat's commented out; uncomment it for your first run (updatingTestTextFileFolderto whatever you want it to be) to make a bunch of tiny files to select viaFilePicker.UnauthorizedAccessException.Link to public reproduction project repository
https://github.com/whodges/mauifilepicker.git
Version with bug
8.0.5
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Windows
Affected platform versions
iOS 17.1.2, Windows 10.0.1.19045
Did you find any workaround?
Nope.
Relevant log output
No response