• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/controller/export.php
  • Класс: BitrixMainControllerExport
  • Вызов: Export::findInitBucket
protected function findInitBucket(array $attributes)
{
	if (!($this->bucket instanceof CCloudStorageBucket))
	{
		$this->bucket = CCloudStorage::FindBucketForFile(
			array(
				'FILE_SIZE' => $attributes['fileSize'],
				'MODULE_ID' => $this->module,
			),
			$attributes['fileName']
		);

		if (
			$this->bucket === null ||
			!($this->bucket instanceof CCloudStorageBucket) ||
			!$this->bucket->init()
		)
		{
			return false;
		}

		$this->bucketId = $this->bucket->ID;
		$this->cloudMinChunkSize = $this->bucket->GetService()->GetMinUploadPartSize(); //5M
	}

	return true;
}