Project

General

Profile

Actions

Feature #100254

open

File Link Browser: Support `download` attribute

Added by Leonie Philine over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2023-03-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

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>


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #83285: Support HTML5 "download" attribute in linksClosed2017-12-01

Actions
Related to TYPO3 Core - Feature #67111: eID=dumpFile - support $asDownload and $alternativeFilename through GPVarsClosed2015-05-22

Actions
Actions

Also available in: Atom PDF