-
Notifications
You must be signed in to change notification settings - Fork 972
File extensions not auto added to some downloads #1985
Comments
Actually extensions are added automatically when downloading, but they are cleared if you change the file name of it. STR:
I think this is a windows-only issue. |
+1 |
This issue is indeed limited to Windows, and also affects the Save As… options. I suspect the issue here is with the prompt receiving little more than a filename (source). void WebContents::DownloadURL(const GURL& url, bool prompt_for_location) {
auto browser_context = web_contents()->GetBrowserContext();
auto download_manager = content::BrowserContext::GetDownloadManager(browser_context);
auto params = content::DownloadUrlParameters::CreateForWebContentsMainFrame(web_contents(), url);
if (prompt_for_location)
params->set_prompt(prompt_for_location);
download_manager->DownloadUrl(std::move(params));
} In Brave, this results in a All Files dialog, whereas Chrome filters on the extension. Note the different values for Save as type in both of the screenshots below. If you replace the filename in Brave, you have no way of telling what the proper extension ought to be. In Chrome, the extension will be enforced by the Save as type option, even if the new filename lacks an extension. macOS pre-selects the filename up to, but not including, the extension. This reduces the likelihood that the user will unintentionally mess up the extension. A |
Adding this to 0.20.x under the assumption that it's fairly straight-forward to use an alternative approach that supports explicit filter lists. If this isn't as straight-forward, please feel free to bump to another milestone. |
When investigating this, it might be good to check this out: electron/electron#10121 (fixed with https://github.com/electron/electron/pull/10469/files) |
+1 from Twitter: https://twitter.com/meta_gear/status/945817220944363522:
|
Will be fixed by #11906 |
@darkdh I was just checking out that PR :) Any idea when that will be merged? |
It requires brave/muon#385 to be merged first. Muon PR is currently under reviewed |
+1 from Twitter https://twitter.com/emacosc/status/953217720878796800 |
Moving to |
Test plan
#11906 (comment)
I have a user report from support that file extensions are not being added for downloaded files. The user says they have to guess the file extension so the file gets saved.
The text was updated successfully, but these errors were encountered: