STEPS TO REPRODUCE 1. Save an image file somewhere in your home directory 1. Navigate to https://imgur.com/upload 2. Click the "Browse" button so that the file dialog opens 3. In the file dialog's URL bar, enter "recentdocuments:/" to navigate to the Recent Documents IOSlave 4. Select the recently-saved image in the file view, and click "Open" to choose it and close the file dialog OBSERVED RESULT The file is not actually passed to the website. EXPECTED RESULT The file is passed to the website properly. VERSIONS Plasma 5.15.5 with Firefox 66.0.3 using native KDE file dialogs by setting GTK_USE_PORTAL=1 in the enfironment
I'm afraid this combination will not work, the reason is that the url returned is e.g. "recentdocuments://your_filename.png" which won't be handled by portals. For this reason we support only local filenames (paths using e.g. file://foo.png). I can leave this open in case portals will change and we will be able to support this.
Is there some way we could have the IOSlave translate that URL into a local path when running in the portal? Heck, maybe it should always do that...
This is bug 406450, which in turn is bug 75324. KDE applications have a way to get the local URL for KIO URLs that are actually local (e.g. trash:/, desktop:/, etc.), but non-KDE applications don't use this API. https://api.kde.org/frameworks/kio/html/classKIO_1_1StatJob.html#a4393f0c1cf278dc6aa8b09789497ec05
Thanks, but I'm not sure I agree that fixing this requires implementing Bug 75324. That would be great of course, but couldn't KIO just detect that the calling app was non-KIO-aware and translate the ioslave's URI into a local path instead?
I can't reproduce this bug with Firefox 82 on neon unstable. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.20.80 KDE Frameworks Version: 5.77.0 Qt Version: 5.15.1
I can't test anymore as my XDG portal dialog on openSUSE Tumbleweed has temporarily broken, but I'll take your word for it!