<a> tag 'download' attribute value is not used when downloading files
Categories
(Firefox for Android :: Downloads, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | verified |
People
(Reporter: theoriginaljamesfranco, Unassigned)
References
Details
(Whiteboard: [fxdroid][group4])
Attachments
(2 files)
Steps to reproduce:
Click a link that has the "download" attribute set to some value. For example:
<a href="/img/my-image.png" download="my-filename.png">Download</a>
The link should be for a same-origin resource, and should be served from a server that doesn't specify a filename in the Content-Disposition HTTP header (this would take precedence over the value of the attribute).
Actual results:
I'm prompted to download the file, but the proposed filename is that of the linked resource ("my-image.png" in the above example).
Expected results:
The proposed filename should be the value of the download attribute ("my-filename.png").
Comment 1•2 years ago
|
||
In Chrome Desktop / Firefox Desktop / Chrome Android , the file is downloaded as "my-filename.png".
In Fenix the file is downloaded as "my-image.png".
Reference:
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes
[2] WHATWG-suggested algorithm to select a filename for a resource being handled as a download
Comment 2•2 years ago
|
||
The severity field is not set for this bug.
:mavduevskiy, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•1 year ago
•
|
||
Based on this comment this seems like a broken web-platform feature and should be re-prioritized.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 5•1 year ago
|
||
As my bug was duped to this one, I'm not sure if the issue is located into GeckoView or not, but I wanted to point that not only Fenix is affected, but Firefox Focus as well.
Comment 6•1 year ago
|
||
Thanks for the additional note, this bug will be to fix it in both Fenix and Focus, using android-components.
Comment 7•1 month ago
|
||
Hey,
I managed to make a repro here: https://download-atest.staticdomains.app/
You can also download the archive I've attached, run python3 -m http.server 8080 and load it on Fenix.
STR
- open https://download-atest.staticdomains.app
- click on the picture
Actual result
- The picture is downloaded as
myw3schoolsimage.jpg
Expected result
- The picture should be downloaded as
newname.jpg
Comment 8•11 days ago
|
||
I think this was solved by bug 2051418 entirely. (During the initial investigation, it looked like it might take two steps.)
Comment 9•7 days ago
|
||
Verified as fixed on the latest Firefox for Android Nightly 154.0a1 from 7/12 using a Pixel 6 (Android 17).
Updated•7 days ago
|
Description
•