• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/ui/uploader/storage.php
  • Класс: BitrixMainUIUploaderCloudStorage
  • Вызов: CloudStorage::copyChunk
public function copyChunk($path, array $file)
{
	if ($bucket = $this->findBucket(array(
		"name" => $file["~name"],
		"size" => $file["~size"],
	)))
	{
		if (($result = $this->moveIntoCloud($bucket, $path, array_merge($file, array("size" => $file["~size"])))) &&
			$result->isSuccess() && ($res = $result->getData()) && $res["finished"] === true)
		{
			$res = $result->getData();
			$result->setData(array(
				"size" => $file["~size"],
				"file_size" => $file["~size"],
				"tmp_name" => $res["tmp_name"],
				"type" => $file["type"],
				"bucketId" => $bucket->ID
			));
		}
	}
	else
	{
		$result = parent::copyChunk($path, $file);
	}
	return $result;
}