- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/downloadcontroller.php
- Класс: BitrixDiskDownloadController
- Вызов: DownloadController::showFileByArray
private function showFileByArray($fileName, $fileData = array(), $cacheTime = 86400, $forceDownload = false): void
{
if (empty($fileName) || !is_array($fileData) || empty($fileData))
{
$this->end();
}
if (TypeFile::isImage($fileData['ORIGINAL_NAME']) || TypeFile::isImage($fileName))
{
$fileData = $this->resizeImage($fileData, $this->file->getId());
}
CFile::viewByUser($fileData, [
'force_download' => $forceDownload,
'cache_time' => $cacheTime,
'attachment_name' => $fileName
]);
}