Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Listing multipart uploads
You can use the Amazon CLI, REST API, or Amazon SDKs, to retrieve a list of in-progress
multipart uploads in Amazon S3. You can use the multipart upload to programmatically upload a
single object to Amazon S3. Multipart uploads move objects into Amazon S3 by moving a portion of an
object's data at a time. For more general information about multipart uploads, see Uploading and copying objects using multipart upload in Amazon S3.
For an end-to-end procedure on uploading an object with multipart upload with an additional checksum, see
Tutorial: Upload an object through multipart upload and
verify its data integrity.
The following section show how to list in-progress multipart uploads with the Amazon Command Line Interface,
the Amazon S3 REST API, and Amazon SDKs.
The following sections in the Amazon Command Line Interface describe the operations for listing multipart
uploads.
The following sections in the Amazon Simple Storage Service API Reference describe the REST API for listing multipart uploads:
- Java
-
The following tasks guide you through using the low-level Java classes to list all
in-progress multipart uploads on a bucket.
Low-level API multipart uploads listing process
1 |
Create an instance of the ListMultipartUploadsRequest class and
provide the bucket name. |
2 |
Run the AmazonS3Client.listMultipartUploads method. The method returns an
instance of the MultipartUploadListing
class that gives you information about the multipart
uploads in progress. |
The following Java code example demonstrates the preceding tasks.
ListMultipartUploadsRequest allMultpartUploadsRequest =
new ListMultipartUploadsRequest(existingBucketName);
MultipartUploadListing multipartUploadListing =
s3Client.listMultipartUploads(allMultpartUploadsRequest);
- .NET
To list all of the in-progress multipart uploads on a specific bucket, use the Amazon SDK for .NET
low-level multipart upload API's ListMultipartUploadsRequest
class. The
AmazonS3Client.ListMultipartUploads
method returns an instance of the
ListMultipartUploadsResponse
class that provides information about the
in-progress multipart uploads.
An in-progress multipart upload is a multipart upload that has been initiated
using the initiate multipart upload request, but has not yet been
completed or stopped. For more information about Amazon S3 multipart uploads,
see Uploading and copying objects using multipart upload in Amazon S3.
The following C# example shows how to use the Amazon SDK for .NET to list all in-progress multipart
uploads on a bucket. For
information about setting up and running the code examples, see Getting Started
with the Amazon SDK for .NET in the Amazon SDK for .NET Developer
Guide.
ListMultipartUploadsRequest request = new ListMultipartUploadsRequest
{
BucketName = bucketName // Bucket receiving the uploads.
};
ListMultipartUploadsResponse response = await AmazonS3Client.ListMultipartUploadsAsync(request);
- PHP
This topic shows how to use the low-level API classes from version 3 of the Amazon SDK for PHP to
list all in-progress multipart uploads on a bucket. For more information about the Amazon SDK for Ruby API, go to Amazon SDK for Ruby - Version
2.
The following PHP example demonstrates listing all in-progress multipart uploads
on a bucket.
require 'vendor/autoload.php';
use Aws\S3\S3Client;
$bucket = '*** Your Bucket Name ***';
$s3 = new S3Client([
'version' => 'latest',
'region' => 'us-east-1'
]);
// Retrieve a list of the current multipart uploads.
$result = $s3->listMultipartUploads([
'Bucket' => $bucket
]);
// Write the list of uploads to the page.
print_r($result->toArray());