Screenshot Tool and downloads.download() lose filename extension on renaming a file

NEW
Unassigned

Status

()

Toolkit
Downloads API
P3
normal
a month ago
6 days ago

People

(Reporter: unfry-bg, Unassigned)

Tracking

58 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a month ago
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171123161455

Steps to reproduce:

1. Check 'Always ask you where to save files' in Firefox preferences.
2. Take a screenshot with Firefox's Screenshot Tool. Click arrow button to save the screenshot.
3. Rename the screenshot and save it.

All the extensions which use downloads.download({ saveAs: true }) share this behavior. Images will lose a filename extension if you rename them before saving.


Actual results:

Image (screenshot) loses its filename extension.


Expected results:

Image (screenshot) should keep its filename extension.

Updated

a month ago
Component: Untriaged → Downloads API
Product: Firefox → Toolkit

Comment 1

9 days ago
Does this happen also if file extensions are hidden in Windows Explorer?

Can you post a screenshot of the file picker dialog before and after the rename?
Flags: needinfo?(unfry-bg)
(Reporter)

Comment 2

8 days ago
(In reply to :Paolo Amadini from comment #1)
> Does this happen also if file extensions are hidden in Windows Explorer?
> 
> Can you post a screenshot of the file picker dialog before and after the
> rename?

Here is demo GIF (8Mb): http://armarium.org/image/XL8
Flags: needinfo?(unfry-bg)

Comment 3

6 days ago
Thank you, it looks like we're not specifying a default extension for the file picker in that case.

My guess is that this won't happen if file extensions are hidden in Windows Explorer, so it should mitigate the issue somewhat. We should still look into this at some point.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.