• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/downloadcontroller.php
  • Класс: BitrixDiskDownloadController
  • Вызов: DownloadController::processActionDownloadVersion
protected function processActionDownloadVersion()
{
	$this->version = $this->file->getVersion($this->versionId);
	if(!$this->version)
	{
		$this->errorCollection->addOne(new Error(Loc::getMessage('DISK_DOWNLOAD_CONTROLLER_ERROR_COULD_NOT_FIND_VERSION'), self::ERROR_COULD_NOT_FIND_VERSION));
		$this->sendJsonErrorResponse();
	}

	$fileData = $this->version->getFile();
	CFile::viewByUser($fileData, array('force_download' => false, 'cache_time' => Configuration::DEFAULT_CACHE_TIME, 'attachment_name' => $this->file->getName()));
}