• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/controller/asset/grabber.php
  • Класс: BitrixTranslateControllerAssetGrabber
  • Вызов: Grabber::downloadAction
public function downloadAction()
{
	$settings = $this->getProgressParameters();

	if (!empty($settings['downloadParams']['filePath']) && !empty($settings['downloadParams']['fileName']))
	{
		$file = new MainIOFile($settings['downloadParams']['filePath']);
		if ($file->isExists())
		{
			$response = new MainEngineResponseFile(
				$file->getPath(),
				$settings['downloadParams']['fileName'],
				$settings['downloadParams']['fileType']
			);

			return $response;
		}
	}

	$this->addError(new Error('File not found'));
}