• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/controller/diskfile.php
  • Класс: BitrixLandingControllerDiskFile
  • Вызов: DiskFile::viewAction
public function viewAction(string $scope, int $blockId, int $fileId): ?array
{
	if ($this->blockContainsFile($scope, $blockId, $fileId))
	{
		$fileInfo = BitrixLandingConnectorDisk::getFileInfo($fileId, false);
		if ($fileInfo)
		{
			$urlToDownload = $this->getDownloadLink($scope, $blockId, $fileId);
			$attributes = ViewerItemAttributes::tryBuildByFileId($fileInfo['ID'], $urlToDownload);
			$attributes->setTitle($fileInfo['NAME']);
			return $attributes->getAttributes();
		}
	}

	$this->addError(new Error('Access denied.'));
	return null;
}