當前位置: 首頁>>代碼示例>>PHP>>正文


PHP S3Client::listParts方法代碼示例

本文整理匯總了PHP中Aws\S3\S3Client::listParts方法的典型用法代碼示例。如果您正苦於以下問題:PHP S3Client::listParts方法的具體用法?PHP S3Client::listParts怎麽用?PHP S3Client::listParts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Aws\S3\S3Client的用法示例。


在下文中一共展示了S3Client::listParts方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: listParts

 /**
  * listParts
  *
  * @param string  $key
  * @param string  $uploadId
  * @param integer $maxParts
  * @param integer $maxNumberMarker
  *
  * @return \Guzzle\Service\Resource\Model
  */
 public function listParts($key, $uploadId, $maxParts = null, $maxNumberMarker = null)
 {
     $params = ['Bucket' => $this->name, 'Key' => $key, 'UploadId' => $uploadId];
     if (!is_null($maxParts)) {
         $params['MaxParts'] = $maxParts;
     }
     if (!is_null($maxNumberMarker)) {
         $params['MaxNumberMarker'] = $maxNumberMarker;
     }
     return $this->client->listParts($params);
 }
開發者ID:m6web,項目名稱:aws-bundle,代碼行數:21,代碼來源:Bucket.php

示例2: listParts

 /**
  * Calling `$this->s3->listParts($fileoptions);` is okay in general unless there are more than 1000 parts - amazon will only send back the manifest for 1000 parts at a time
  * With a chuink size of 5mb the file only needs to be >5GB for this to happen.
  * We call the function recursively to fetch the next set of parts until we have them all.
  * 
  * @param array $fileoptions
  * @return array
  */
 private function listParts($fileoptions)
 {
     $parts = $this->s3->listParts($fileoptions);
     $fileoptions['PartNumberMarker'] = $parts['NextPartNumberMarker'];
     return $parts['IsTruncated'] ? array_merge($parts['Parts'], $this->listParts($fileoptions)) : $parts['Parts'];
 }
開發者ID:joegreen0991,項目名稱:s3multiupload,代碼行數:14,代碼來源:Client.php


注:本文中的Aws\S3\S3Client::listParts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。