Example #1
0
 /**
  * Abort the multipart upload with amazon and remove the key from storage
  * 
  * @param string $multipart_id
  * @throws KeyNotFoundException
  */
 public function abortMultipartUpload($multipart_id)
 {
     if (!(list($bucket, $key) = $this->key_storage->get($multipart_id))) {
         throw new KeyNotFoundException('There is no upload in progress for key "' . $multipart_id . '"');
     }
     $this->s3->abortMultipartUpload(array('Bucket' => $bucket, 'Key' => $key, 'UploadId' => $multipart_id));
     $this->key_storage->forget($multipart_id);
 }
Example #2
0
 /**
  * abortMultipartUpload
  *
  * @param string $key
  * @param string $uploadId
  *
  * @return \Guzzle\Service\Resource\Model
  */
 public function abortMultipartUpload($key, $uploadId)
 {
     return $this->client->abortMultipartUpload(['Bucket' => $this->name, 'Key' => $key, 'UploadId' => $uploadId]);
 }