Bug 490327

Summary: KDE File Picker spawned from Firefox using xdg-portals cannot submit more than 1071 files to add to an HTML file input
Product: [Plasma] xdg-desktop-portal-kde Reporter: Daktyl <dakky198>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: normal CC: ad.liu.jin, aleixpol
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Error message when opening large number of files

Description Daktyl 2024-07-15 21:40:24 UTC
Created attachment 171692 [details]
Error message when opening large number of files

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
After forcing Firefox to use xdg-portals for it's file picker, if you select more than 1071 files using an HTML input[type=files] and hit "Open", you will receive a "file cannot be found" error, with a truncated file name. Using Firefox's built-in GTK file picker I was able to submit more than 4400 files successfully.

STEPS TO REPRODUCE
1. Enable xdg-portals in Firefox by setting `widget.use-xdg-desktop-portal.file-picker` to 1
2. Navigate to any site that opens a file picker
3. Select more than 1071 files
4. Try to submit those files by clicking "Open"

OBSERVED RESULT
Error stating "the file cannot be found" with a broken file path.

EXPECTED RESULT
All selected files to be added to the HTML form for further processing.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: CachyOS
(available in About System)
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION