• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Controller/Call/Background.php
  • Класс: BitrixImV2ControllerCallBackground
  • Вызов: Background::commitAction
public function commitAction(int $fileId)
{
	$result = CIMDisk::CommitBackgroundFile(
		$this->getCurrentUser()->getId(),
		$fileId
	);

	if (!$result)
	{
		$this->addError(new BitrixMainError(
			"Specified fileId is not located in background folder.",
			"FILE_ID_ERROR"
		));

		return false;
	}

	return [
		'result' => true
	];
}