files-community / Files

Building the best file manager for Windows
https://files.community
MIT License
34.05k stars 2.18k forks source link

Bug: Can't save photo using drag and drop from Chromium based browser #15147

Open nasimpro opened 5 months ago

nasimpro commented 5 months ago

Description

Whenever I need to save a photo from Facebook or any other website, I typically open a folder using the Windows built-in File Explorer. Then, I place that folder window on my second monitor and simply drag the photo from the browser window to the folder. This method has always allowed me to save photos efficiently, which is incredibly useful when I need to collect several images on a specific topic.

However, when using the "Files" explorer, the file isn't saved in the designated folder. Despite the message "Copied 1 item(s) to "XYZ Folder"" appearing in the status center located at the top right corner, the file doesn't actually appear in the folder, nor is it saved. You can confirm this by refreshing the folder.

Steps To Reproduce

Open a web browser window containing a photo. Open a folder, preferably by creating an empty folder using the "Files" browser on your local drive. Position the "Files" browser window next to your web browser window. Drag and drop the photo from the web browser window into your folder.

Requirements

Please fix this issue so we can save photos by just dragging from a web-browser window to a folder opened with "Files" browser.

Files Version

3.3.0.0

Windows Version

10.0.19045.4291

Log File

debug.log

Josh65-2201 commented 5 months ago

Thanks for the report, What browser are you using?

nasimpro commented 5 months ago

Thanks for the report, What browser are you using?

Dragging Save VS save by Save Image As Firefox to File

Josh65-2201 commented 5 months ago

You should open a separate bug report for Firefox saving as bmp. I am unable to reproduce the issue of the file not showing up on Chrome or Edge

nasimpro commented 5 months ago

I am unable to reproduce the issue of the file not showing up on Chrome or Edge

Are you on Windows 10? I also gave Edge a shot, and it behaves just like Chrome and Opera for me.

yaira2 commented 5 months ago

It might have to do with Windows 10, that said, Microsoft might have a fix for this in the latest version of WinAppSdk. Please let us know if this is still an issue after v3.3.2 is released to preview (eta in the next few weeks).

Josh65-2201 commented 5 months ago

@nasimpro Can you see if this is still an issue in the preview version. https://files.community/download

wardhale commented 4 months ago

So, I'm having issues with drag and drop as well. Drag and drop from Firefox produces a massive bmp file. image

Drag and drop from edge does nothing. It says, "copy to," then when I release my mouse, nothing happens.

Also, I can not drag and drop into Adobe Lightroom. I can drag and drop into other Adobe programs like Premiere. Also, other programs like OneCommander work fine... but I much prefer Files.

Windows 10 Pro Version 10.0.19045 Build 19045 Using Files Preview 3.4.1.0

yaira2 commented 4 months ago

Drag & drop is complex to get right. Each time we fix one issue, it feels like another issue crops up. That said, we're continuing to invest in this area and we're working hard to get it right.

wardhale commented 4 months ago

I think most people probably think it just works like magic. I really appreciate all the work on this. I'll test it out on Windows 11 tonight and see how that goes.

wardhale commented 4 months ago

Update... tried it on 11 Version 10.0.22631 Build 22631 and the latest preview build of Files. Drag and drop from Edge works perfectly. However, drag and drop from FireFox still creates a massive bitmap file. I don't have Adobe Lightroom installed on that PC. So, I'll have to test that later. It seems Windows 11 is slightly better than 10 with this issue.

samomar commented 2 weeks ago

Drag & drop is complex to get right. Each time we fix one issue, it feels like another issue crops up. That said, we're continuing to invest in this area and we're working hard to get it right.

The issue with saving files dragged from Chromium-based browsers can be resolved by detecting whether the dropped item is a URL rather than a file path. If it's a URL (as is common when dragging images from a browser), the solution is to download the image from the URL and save it to the designated folder. This ensures that the file is properly stored, addressing the discrepancy in drag-and-drop behavior between browsers and local file systems.

yaira2 commented 2 weeks ago

@samomar this is useful information! I've had trouble reproducing this personally but I'm well aware that it's affecting users. Are you interested in working on this?

samomar commented 2 weeks ago

@samomar this is useful information! I've had trouble reproducing this personally but I'm well aware that it's affecting users. Are you interested in working on this?

I'd love to help, though I may not be deeply familiar with the full code base. I looked around; here's what I think would help:

This should address the issue with dragging files from browsers.