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

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