Feature: When dragging images from Firefox, use CF_HDROP
See original GitHub issueWhat feature or improvement do you think would benefit Files?
This issue was originally reported in #3357, wherein dragging image files from Firefox into Files would copy a bitmap file with a random file name instead of the expected file name and format.
Consider a JPEG file like https://upload.wikimedia.org/wikipedia/commons/0/04/Seychelles_parakeet_pair.jpg. If we copy the image from Firefox and then inspect the clipboard format with a tool like InsideClipboard, we can see a list of formats are supported:
Of these, only two of them are image formats: CF_DIBV5
and CF_DIB
. The bitmap file that is created today is sourced from one of these two. Firefox however exposes the true file name and format in CF_HDROP
, where it points to a temporary file in the user’s local app data folder. See the above image and https://learn.microsoft.com/en-us/windows/win32/shell/clipboard#cf_hdrop.
If we were to drag and drop the image into Windows File Explorer, we can infer that it respects CF_HDROP
because the resulting file is thus saved as ‘Seychelles_parakeet_pair.jpg’ and with a JPEG format, which is what we want.
Requirements
- When Files is a drop target from other programs, Files will inspect CF_HDROP to determine if it is suitable for copying/moving files, and otherwise fallback to a different clipboard format.
Files Version
2.5.1.0
Windows Version
10.0.19045.2965
Comments
No response
Issue Analytics
- State:
- Created 3 months ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
That issue looks like drag-and-drop from Files, not to it. This issue doesn’t cover it.
Should this be merge with to https://github.com/files-community/Files/issues/11735