• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/bitrix24disk/legacy/diskstorage.php
  • Класс: BitrixDiskBitrix24DiskLegacyDiskStorage
  • Вызов: DiskStorage::sendFile
public function sendFile($file)
{
	/** @var File $file */
	$file = File::loadById($file['extra']['id']);
	if(!$file || !$file->canRead($this->storage->getSecurityContext($this->userId)))
	{
		throw new AccessDeniedException;
	}

	/** @noinspection PhpUndefinedClassInspection */
	/** @noinspection PhpVoidFunctionResultUsedInspection */
	return CFile::viewByUser($file->getFile(), array("force_download" => true));
}