Change record status: 
Project: 
Introduced in branch: 
1.1.x
Introduced in version: 
1.1.0-alpha1
Description: 

The default behavior for all media downloads is to display the file contents in the browser where possible, then fall back to a regular file download. Now it is possible to force Content-Disposition: attachment by setting the query parameter dl=1 on the media entity's canonical path.

For example:

https://www.example.org/media/NN will result in the default behavior where an inline content disposition is preferred, but will fall back to a regular download if inline display is not possible.

https://www.example.org/media/NN?dl=1 will force the file to be saved to disk by the browser.

Development notes:

  1. Any value other than dl=1 is currently ignored, but may see future use.
  2. Backward compatibility is not guaranteed for any values where dl does not equal 1.
  3. As a result, the only two supported request scenarios are when dl is not present, or dl=1.
Impacts: 
Site builders, administrators, editors
Module developers
Site templates, recipes and distribution developers