src/BaiduBce/Services/Bos/BosClient.php
public function initiateMultipartUpload(
        $bucketName,
        $key,
        $options = array()
    ) {
        list($config, $storageClass) = $this->parseOptions(
            $options, 
            BosOptions::CONFIG,
            BosOptions::STORAGE_CLASS);

        $headers = array(
            HttpHeaders::CONTENT_TYPE => HttpContentTypes::OCTET_STREAM,
        );
        if ($storageClass !== null) {
            $headers[HttpHeaders::BCE_STORAGE_CLASS] = $storageClass;
        } else {
            $headers[HttpHeaders::BCE_STORAGE_CLASS] = StorageClass::STANDARD;
        }

        return $this->sendRequest(
            HttpMethod::POST,
            array(
                BosOptions::CONFIG => $config,
                'bucket_name' => $bucketName,
                'key' => $key,
                'headers' => $headers,
                'params' => array('uploads' => ''),
            )
        );
    }
public function initiateMultipartUpload(
        $bucketName,
        $key,
        $options = array()
    ) {
        list($config, $storageClass) = $this->parseOptions(
            $options, 
            BosOptions::CONFIG,
            BosOptions::STORAGE_CLASS);

        $headers = array(
            HttpHeaders::CONTENT_TYPE => HttpContentTypes::OCTET_STREAM,
        );
        if ($storageClass !== null) {
            $headers[HttpHeaders::BCE_STORAGE_CLASS] = $storageClass;
        } else {
            $headers[HttpHeaders::BCE_STORAGE_CLASS] = StorageClass::STANDARD;
        }

        return $this->sendRequest(
            HttpMethod::POST,
            array(
                BosOptions::CONFIG => $config,
                'bucket_name' => $bucketName,
                'key' => $key,
                'headers' => $headers,
                'params' => array('uploads' => ''),
            )
        );
    }
public function initiateMultipartUpload ( $ bucketName , $ key , $ options = array ( ) ) { list ( $ config , $ storageClass ) = $ this -> parseOptions ( $ options , BosOptions :: CONFIG , BosOptions :: STORAGE_CLASS ) ; $ headers = array ( HttpHeaders :: CONTENT_TYPE => HttpContentTypes :: OCTET_STREAM , ) ; if ( $ storageClass !== null ) { $ headers [ HttpHeaders :: BCE_STORAGE_CLASS ] = $ storageClass ; } else { $ headers [ HttpHeaders :: BCE_STORAGE_CLASS ] = StorageClass :: STANDARD ; } return $ this -> sendRequest ( HttpMethod :: POST , array ( BosOptions :: CONFIG => $ config , 'bucket_name' => $ bucketName , 'key' => $ key , 'headers' => $ headers , 'params' => array ( 'uploads' => '' ) , ) ) ; }
Initialize multi_upload_file.

@param string $bucketName The bucket name.
@param string $key The object path.
@param mixed $options The optional bce configuration, which will overwrite the
default configuration that was passed while creating BosClient instance.

@return mixed
Initialize multi_upload_file .