question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: When dragging images from Firefox, use CF_HDROP

See original GitHub issue

What 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:

image

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.

image

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:open
  • Created 3 months ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Trinitekcommented, Jul 4, 2023

Should this be merge with to #11735

That issue looks like drag-and-drop from Files, not to it. This issue doesn’t cover it.

0reactions
Josh65-2201commented, Jul 4, 2023
Read more comments on GitHub >

github_iconTop Results From Across the Web

Drag and drop images from firefox, to folders and
Drag and drop images from firefox, to folders and applications. This is an already implemented feature on Edge, Chrome, Safari and even Opera....
Read more >
Drag and drop images from one web page to anothor.
Hi Team,. I would like to request an feature where we can drag and drop an image from another website to another web...
Read more >
As of a few months ago, when I drag an image from Firefox ...
As of a few months ago, when I drag an image from Firefox to the desktop, the file is saved with no extension....
Read more >
why i cant drag and drop photos from firefox to pc
In Firefox: right-click the image > Copy Image; In File Explorer: right-click a blank area of the folder or desktop > Paste.
Read more >
file drag and drop in Firefox 3.6 - Mozilla Hacks - the Web ...
In Firefox 3.6, you can let your users drag and drop files directly into your web page, without going through the file picker....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found