files
files copied to clipboard
Drag and drop to upload fails between Files and Epiphany
What Happened
I dragged a screenshot into a message I was composing in Mastodon on Epiphany.
Even though the interface was expecting the drop, it did not register as a file upload and instead replaced my Mastodon page with the image itself.
Expected Behavior
The screenshot should have uploaded to my Mastodon.
Steps to Reproduce
- Open the elementary mastodon page in Epiphany
- Start writing a toot
- Drag an image from Files into your message (wait for the “drag and drop to upload” message to appear before completing the drop)
Logs
n/a
Platform Information
elementary OS 5.1.7 Hera x86_64
Thanks for the report. Could you advise whether you can drag/drop an image from Files into a GitHub comment with Epiphany? This works for me with Chromium browser.
I just tested on Firefox and drag and drop from Files works there. This is apparently an issue with Epiphany not Files. Can someone with the correct permissions please move it there? Thanks!
Before doing that best try dropping from Nautilus into Epiphany.
Same problem here, on Arch, with Epiphany 40.3-1.
Before doing that best try dropping from Nautilus into Epiphany.
I have tried, it doesn't work.
This issue is a duplicate of elementary/browser#31, epiphany only declare access to the xdg-downloads
folder, so drag and drop only works with files from the Downloads folder.
Can confirm the issue both on Files > Epiphany and on Files > Firefox (flatpak).
When I try to drag and drop on Github, this is what happens:
file:///home/suzuki/Pictures/Screenshots/Elementary%20Photos%20low%20contrast.png
It pastes the path, instead of the picture. The same happened on Google Images. Both on GNOME Web and on Firefox, so I suspect the issue lies between Elementary Files and Flatpaks, but I could be wrong.
Just to note that I successfully dragged an image file from Files to a GitHub comment on the Chromium Browser (not flatpak) so I agree it is probably the flatpak sandbox which is at least partially responsible. I tried it with Gnome-Web (flatpak) and got a "This file is empty" warning from GitHub.
I think this is an example of a fairly long-outstanding issue with flatpak (and X?) - see https://github.com/flatpak/xdg-desktop-portal/issues/99 for some discussion and links. It sounds like with Gtk4 this should be fixed transparently. Not sure how to get the FlatPak DnD portal to work in Gtk3 though.
@jeremypw Someone familiar with GTK3 would need to backport the GTK4 portal to GTK3. The actual portal code is fairly easy to do, it's the big changes in how the clipboard works that complicates it :-/