Closed Bug 1673061 Opened 4 years ago Closed 3 years ago

Bad file extension when using an HTMLAnchorElement with the download attribute

Categories

(Core :: DOM: File, defect, P3)

Firefox 84
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: github.christian, Unassigned)

References

Details

Attachments

(1 file)

Attached file index.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

I try to save a text string in a txt file, using window.URL.createObjectURL , then passing the ObjectURL to an HTMLAnchorElement with the attribute download set to the desired file name ( see the attached index.html file )

Actual results:

The file is downloaded but the file extension (.xyz in the attached file) is changed to .txt.
See also bug 1660636, already created by me and fixed in version 82 for a very similar problem.

Expected results:

The extension must be the extension given in the file name.
Work fine in version 82.

Component: Untriaged → DOM: File
Product: Firefox → Core

The severity field is not set for this bug.
:jstutte, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jstutte)
Severity: -- → S3
Priority: -- → P3
Flags: needinfo?(jstutte)

The reporter said in bug 1768898 that this could be closed, so closing.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: