• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/documentcontroller.php
  • Класс: BitrixDiskDocumentDocumentController
  • Вызов: DocumentController::processActionShow
protected function processActionShow()
{
	$fileData = $this->prepareFileData();

	$dataForView = $this->documentHandler->getDataForViewFile($fileData);
	if (!$dataForView)
	{
		if (
			!$this->documentHandler->queryAccessToken()->hasAccessToken() ||
			$this->documentHandler->isRequiredAuthorization()
		)
		{
			$this->sendNeedAuth();
		}
	}


	if ($this->documentHandler->getErrors())
	{
		$this->errorCollection->add($this->documentHandler->getErrors());
		$this->sendJsonErrorResponse($dataForView?: array());
	}

	if (!$dataForView)
	{
		$this->errorCollection[] = new Error(Loc::getMessage('DISK_DOC_CONTROLLER_ERROR_PLEASE_RELOAD_PAGE'));
		$this->sendJsonErrorResponse();
	}

	$dataForView['service'] = $this->getDocumentHandlerName();
	$this->sendJsonSuccessResponse($dataForView);
}