Issue Feature Closed

#100254File Link Browser: Support `download` attribute

Leonie Philine 03/22/23, 14:30 updated 03/31/26, 09:00

Description

Support per-link download attribute support in file link browser

The a[download] attribute has widespread support: https://caniuse.com/download

A partial solution exists with https://forge.typo3.org/issues/83285

However, this does not solve the problem of per-link (rather than per-FAL-file or per-fluid-template) enforced download.

Use case example:

Some file types, such as PDF, MP3 and MP4 can be displayed by the browser.

As a website author, editors want to be able to provide links to view / listen / watch in the browser, and alternative links to download the same PDF / MP3 / MP4 file.

This requires the download attribute to be editable in the RTE link browser, as well as – to a lesser extent (as fluid templates can be overridden for that use case) – other places where link browsers are used (link input fields).

Documentation:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes

Proposal:

- Provide a checkbox in the link properties pane, such as
[ ] Force file download.
Result: <a href="..." download>...</a>

- When the checkbox is checked, provide an optional input field for the download file name.
[x] Force file download | Download as: [placeholder.pdf ]
Result if filled: <a href="..." download="custom-filename.pdf">...</a>

Reviews 1

History 78

  1. Leonie Philine commented 03/22/23, 14:34

    Additional relation (via https://forge.typo3.org/issues/83285): https://forge.typo3.org/issues/67111

    The OP note applies to both related forge issues:

    > However, this does not solve the problem of per-link (rather than per-FAL-file or per-fluid-template) enforced download.

    Distinctly in regards to RTE-links.

  2. Leonie Philine changed target version 03/22/23, 14:38

  3. Benni Mack changed target version 04/05/23, 09:54

  4. Georg Ringer changed Related to #83285 08/04/24, 09:00

  5. Georg Ringer changed Related to #67111 08/04/24, 09:00

  6. Gerrit Code Review pushed patch set 1 for main to change 93212 status New Under Review 03/16/26, 20:18

  7. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % 03/30/26, 19:10

    Applied in changeset commit:1ce454a76e6a0a3844855be61475729c2d8793f1.

  8. Benni Mack changed status Resolved Closed 03/31/26, 09:00