AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Provides a high level utility for managing transfers to and from Amazon S3.
TransferUtility
provides a simple API for
uploading content to and downloading content
from Amazon S3. It makes extensive use of Amazon S3 multipart uploads to
achieve enhanced throughput, performance, and reliability.
When uploading large files by specifying file paths instead of a stream,
TransferUtility
uses multiple threads to upload
multiple parts of a single upload at once. When dealing with large content
sizes and high bandwidth, this can increase throughput significantly.
Namespace: Amazon.S3.Transfer
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public class TransferUtility IDisposable, ITransferUtility
The TransferUtility type exposes the following members
Name | Description | |
---|---|---|
![]() |
TransferUtility(string, string) |
Constructs a new Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(string, string, RegionEndpoint) |
Constructs a new Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(string, string, TransferUtilityConfig) |
Constructs a new instance of the Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(string, string, RegionEndpoint, TransferUtilityConfig) |
Constructs a new instance of the Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(IAmazonS3) |
Constructs a new instance of the Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(IAmazonS3, TransferUtilityConfig) |
Initializes a new instance of the Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility() |
Constructs a new Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(RegionEndpoint) |
Constructs a new Amazon.S3.Transfer.TransferUtility class. |
![]() |
TransferUtility(TransferUtilityConfig) |
Constructs a new Amazon.S3.Transfer.TransferUtility class. |
Name | Type | Description | |
---|---|---|---|
![]() |
S3Client | Amazon.S3.IAmazonS3 |
Gets the Amazon S3 client used for making calls into Amazon S3. |
Name | Description | |
---|---|---|
![]() |
AbortMultipartUploads(string, DateTime) |
Aborts the multipart uploads that were initiated before the specified date. |
![]() |
AbortMultipartUploadsAsync(string, DateTime, CancellationToken) |
Aborts the multipart uploads that were initiated before the specified date. |
![]() |
Dispose() |
Disposes of all managed and unmanaged resources. |
![]() |
Download(string, string, string) |
Downloads the content from Amazon S3 and writes it to the specified file. |
![]() |
Download(TransferUtilityDownloadRequest) |
Downloads the content from Amazon S3 and writes it to the specified file. If the key is not specified in the request parameter, the file name will used as the key name. |
![]() |
DownloadAsync(TransferUtilityDownloadRequest, CancellationToken) |
Downloads the content from Amazon S3 and writes it to the specified file. If the key is not specified in the request parameter, the file name will used as the key name. |
![]() |
DownloadAsync(string, string, string, CancellationToken) |
Downloads the content from Amazon S3 and writes it to the specified file. |
![]() |
DownloadDirectory(string, string, string) |
Downloads the objects in Amazon S3 that have a key that starts with the value
specified by |
![]() |
DownloadDirectory(TransferUtilityDownloadDirectoryRequest) |
Downloads the objects in Amazon S3 that have a key that starts with the value
specified by the |
![]() |
DownloadDirectoryAsync(string, string, string, CancellationToken) |
Downloads the objects in Amazon S3 that have a key that starts with the value
specified by |
![]() |
DownloadDirectoryAsync(TransferUtilityDownloadDirectoryRequest, CancellationToken) |
Downloads the objects in Amazon S3 that have a key that starts with the value
specified by the |
![]() |
OpenStream(string, string) |
Returns a stream from which the caller can read the content from the specified Amazon S3 bucket and key. The caller of this method is responsible for closing the stream. |
![]() |
OpenStream(TransferUtilityOpenStreamRequest) |
Returns a stream to read the contents from Amazon S3 as
specified by the |
![]() |
OpenStreamAsync(string, string, CancellationToken) |
Returns a stream from which the caller can read the content from the specified Amazon S3 bucket and key. The caller of this method is responsible for closing the stream. |
![]() |
OpenStreamAsync(TransferUtilityOpenStreamRequest, CancellationToken) |
Returns a stream to read the contents from Amazon S3 as
specified by the |
![]() |
Upload(string, string) |
Uploads the specified file. The object key is derived from the file's name. Multiple threads are used to read the file and perform multiple uploads in parallel. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
Upload(string, string, string) |
Uploads the specified file. Multiple threads are used to read the file and perform multiple uploads in parallel. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
Upload(Stream, string, string) |
Uploads the contents of the specified stream. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
Upload(TransferUtilityUploadRequest) |
Uploads the file or stream specified by the request.
To track the progress of the upload,
add an event listener to the request's |
![]() |
UploadAsync(string, string, CancellationToken) |
Uploads the specified file. The object key is derived from the file's name. Multiple threads are used to read the file and perform multiple uploads in parallel. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadAsync(string, string, string, CancellationToken) |
Uploads the specified file. Multiple threads are used to read the file and perform multiple uploads in parallel. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadAsync(Stream, string, string, CancellationToken) |
Uploads the contents of the specified stream. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadAsync(TransferUtilityUploadRequest, CancellationToken) |
Uploads the file or stream specified by the request.
To track the progress of the upload,
add an event listener to the request's |
![]() |
UploadDirectory(string, string) |
Uploads files from a specified directory. The object key is derived from the file names inside the directory. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadDirectory(string, string, string, SearchOption) |
Uploads files from a specified directory. The object key is derived from the file names inside the directory. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadDirectory(TransferUtilityUploadDirectoryRequest) |
Uploads files from a specified directory. The object key is derived from the file names inside the directory. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadDirectoryAsync(string, string, CancellationToken) |
Uploads files from a specified directory. The object key is derived from the file names inside the directory. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadDirectoryAsync(string, string, string, SearchOption, CancellationToken) |
Uploads files from a specified directory. The object key is derived from the file names inside the directory. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
![]() |
UploadDirectoryAsync(TransferUtilityUploadDirectoryRequest, CancellationToken) |
Uploads files from a specified directory. The object key is derived from the file names inside the directory. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3. |
Transfers are stored in memory. If the application is restarted, previous transfers are no longer accessible. In this situation, if necessary, you should clean up any multipart uploads that are incomplete.
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5