efpapado
01/16/2024, 7:58 AMefpapado
01/16/2024, 7:59 AMkostask
01/16/2024, 8:40 AMefpapado
01/16/2024, 8:43 AMefpapado
01/16/2024, 8:43 AMkostask
01/16/2024, 8:43 AMkostask
01/16/2024, 8:44 AMkostask
01/16/2024, 8:44 AMkostask
01/16/2024, 8:45 AMkostask
01/16/2024, 8:46 AMkostask
01/16/2024, 8:46 AMefpapado
01/16/2024, 8:47 AMefpapado
01/16/2024, 8:47 AMkostask
01/16/2024, 8:47 AMefpapado
01/16/2024, 8:47 AMkostask
01/16/2024, 8:47 AMkostask
01/16/2024, 8:49 AMkostask
01/16/2024, 8:51 AM// If the file schema is s3:// then provide an internal download link so that
// the file stream wrapper is authenticated via the S3 module.
if (StreamWrapperManager::getScheme($file->getFileUri()) == 's3') {
$download_url_options = ['attributes' => ['type' => $mime_type . '; length=' . $file->getSize()]];
$download_url = new Url('modulename.file_download', ['file' => $file->id()], $download_url_options);
$variables['link'] = Link::fromTextAndUrl($link_text, $download_url)->toRenderable();
}
σε μια hook_preprocess_file_linkefpapado
01/16/2024, 8:53 AMkostask
01/16/2024, 8:53 AM