file_file_download
function file_file_download
file_file_download($uri)
Implements hook_file_download().
File
- core/modules/file/file.module, line 582
- Defines a "managed_file" Form API field and a "file" field for Field module.
Code
function file_file_download($uri) { // Get the file record based on the URI. If not in the database just return. /** @var \Drupal\file\FileInterface[] $files */ $files = entity_load_multiple_by_properties('file', array('uri' => $uri)); if (count($files)) { foreach ($files as $item) { // Since some database servers sometimes use a case-insens