General

  eZ Systems Website
  Technical documentation
  Editor documentation

This Documentation contains:
 
Technical documentation:



⚠ WARNING ! This documentation is deprecated !

Please go to the current Technical Documentation

Skip to end of metadata
Go to start of metadata

Unlike image files, files stored in BinaryFile or Media Fields may be limited to certain User Roles. As such, they are not publicly downloadable from disk, and are instead served by Symfony, using a custom route that runs the necessary checks. This route is automatically generated as the url property for those Fields values.

The content/download route

The route follows this pattern: /content/download/{contentId}/{fieldIdentifier}/{filename}. Example: /content/download/68/file/My-file.pdf.

It also accepts optional query parameters:

  • versionthe version number that the file must be downloaded for. Requires the versionview permission. If not specified, the published version is used.
  • inLanguageThe language the file should be downloaded in. If not specified, the most prioritized language for the siteaccess will be used.

The ez_render_field twig helper will by default generate a working link.

REST API: The `uri` property contains a valid download URL

The uri property of Binary Fields in REST contain a valid URL, of the same format than the Public API, prefixed with the same host than the REST Request.

For more information about REST API see the documentation.