Class TransferUtilityUploadRequest
Contains all the parameters
that can be set when making a this request with the
TransferUtility
method.
public class TransferUtilityUploadRequest : BaseUploadRequest
- Inheritance
-
TransferUtilityUploadRequest
- Inherited Members
Constructors
TransferUtilityUploadRequest()
public TransferUtilityUploadRequest()
Properties
AutoCloseStream
Gets or sets whether or not the stream used with this request is automatically closed when all of the content is read from the stream.
public bool AutoCloseStream { get; set; }
Property Value
- bool
A value of
true
if the if the stream is automatically closed when all of the content is read from the stream. A value offalse
if otherwise.
AutoResetStreamPosition
If this value is set to true then the stream's position will be reset to the start before being read for upload. Default: true.
public bool AutoResetStreamPosition { get; set; }
Property Value
BucketName
Gets or sets the name of the bucket.
public string BucketName { get; set; }
Property Value
- string
The name of the bucket.
CannedACL
Gets or sets the canned access control list (ACL) for the uploaded object. Please refer to S3CannedACL for information on Amazon S3 canned ACLs.
public S3CannedACL CannedACL { get; set; }
Property Value
- S3CannedACL
The canned access control list (ACL) for the uploaded object.
ContentType
Gets or sets the content type of the uploaded Amazon S3 object.
public string ContentType { get; set; }
Property Value
- string
The content type of the uploaded Amazon S3 object.
DisableMD5Stream
WARNING: Setting DisableMD5Stream to true disables the MD5 data integrity check on this request.
When true, MD5Stream will not be used in the upload request. This may increase upload performance under high CPU loads. The default value is null. When null, the AWSConfigsS3.DisableMD5Stream property value will be used.
MD5Stream, SigV4 payload signing, and HTTPS each provide some data integrity verification. If DisableMD5Stream is true and DisablePayloadSigning is true, then the possibility of data corruption is completely dependant on HTTPS being the only remaining source of data integrity verification.
public bool? DisableMD5Stream { get; set; }
Property Value
- bool?
DisablePayloadSigning
WARNING: Setting DisablePayloadSigning to true disables the SigV4 payload signing data integrity check on this request.
If using SigV4, the DisablePayloadSigning flag controls if the payload should be signed on a request by request basis. By default this flag is null which will use the default client behavior. The default client behavior is to sign the payload. When DisablePayloadSigning is true, the request will be signed with an UNSIGNED-PAYLOAD value. Setting DisablePayloadSigning to true requires that the request is sent over a HTTPS connection.
Under certain circumstances, such as uploading to S3 while using MD5 hashing, it may be desireable to use UNSIGNED-PAYLOAD to decrease signing CPU usage. This flag only applies to Amazon S3 PutObject and UploadPart requests.
MD5Stream, SigV4 payload signing, and HTTPS each provide some data integrity verification. If DisableMD5Stream is true and DisablePayloadSigning is true, then the possibility of data corruption is completely dependant on HTTPS being the only remaining source of data integrity verification.
public bool? DisablePayloadSigning { get; set; }
Property Value
- bool?
FilePath
Gets or sets the file path where the Amazon S3 object will be uploaded from.
For WinRT and Windows Phone this property must be in the form of "ms-appdata:///local/file.txt".
public string FilePath { get; set; }
Property Value
- string
The file path where the Amazon S3 object will be uploaded from.
Headers
The collection of headers for the request.
public HeadersCollection Headers { get; }
Property Value
InputStream
Input stream for the request; content for the request will be read from the stream.
public Stream InputStream { get; set; }
Property Value
Key
Gets or sets the key under which the Amazon S3 object is to be stored.
public string Key { get; set; }
Property Value
- string
The key under which the Amazon S3 object is to be stored.
Metadata
The collection of meta data for the request.
public MetadataCollection Metadata { get; }
Property Value
PartSize
Gets or sets the part size of the upload in bytes. The uploaded file will be divided into parts the size specified and uploaded to Amazon S3 individually.
public long PartSize { get; set; }
Property Value
- long
The part size of the upload.
ServerSideEncryptionCustomerMethod
The Server-side encryption algorithm to be used with the customer provided key.
public ServerSideEncryptionCustomerMethod ServerSideEncryptionCustomerMethod { get; set; }
Property Value
ServerSideEncryptionCustomerProvidedKey
The base64-encoded encryption key for Amazon S3 to use to encrypt the object
Using the encryption key you provide as part of your request Amazon S3 manages both the encryption, as it writes to disks, and decryption, when you access your objects. Therefore, you don't need to maintain any data encryption code. The only thing you do is manage the encryption keys you provide.
When you retrieve an object, you must provide the same encryption key as part of your request. Amazon S3 first verifies the encryption key you provided matches, and then decrypts the object before returning the object data to you.
Important: Amazon S3 does not store the encryption key you provide.
public string ServerSideEncryptionCustomerProvidedKey { get; set; }
Property Value
ServerSideEncryptionCustomerProvidedKeyMD5
The MD5 of the customer encryption key specified in the ServerSideEncryptionCustomerProvidedKey property. The MD5 is base 64 encoded. This field is optional, the SDK will calculate the MD5 if this is not set.
public string ServerSideEncryptionCustomerProvidedKeyMD5 { get; set; }
Property Value
ServerSideEncryptionKeyManagementServiceKeyId
The id of the AWS Key Management Service key that Amazon S3 should use to encrypt and decrypt the object. If a key id is not specified, the default key will be used for encryption and decryption.
public string ServerSideEncryptionKeyManagementServiceKeyId { get; set; }
Property Value
ServerSideEncryptionMethod
Gets and sets the ServerSideEncryptionMethod property. Specifies the encryption used on the server to store the content.
public ServerSideEncryptionMethod ServerSideEncryptionMethod { get; set; }
Property Value
StorageClass
Gets or sets the storage class for the uploaded Amazon S3 object. Please refer to S3StorageClass for information on S3 Storage Classes.
public S3StorageClass StorageClass { get; set; }
Property Value
- S3StorageClass
The storage class for the uploaded Amazon S3 object.
TagSet
The tag-set for the object.
public List<Tag> TagSet { get; set; }
Property Value
Methods
RemoveCannedACL()
Removes the cannned access control list (ACL) for the uploaded object.
public void RemoveCannedACL()
WithAutoCloseStream(bool)
Sets whether or not the stream used with this request is automatically closed when all of the content is read from the stream and returns this object instance, enabling additional method calls to be chained together.
public TransferUtilityUploadRequest WithAutoCloseStream(bool autoCloseStream)
Parameters
autoCloseStream
boolA value of
true
if the if the stream is automatically closed when all of the content is read from the stream. A value offalse
if otherwise.
Returns
- TransferUtilityUploadRequest
This object instance, enabling additional method calls to be chained together.
Events
UploadProgressEvent
The event for UploadProgressEvent notifications. All subscribers will be notified when a new progress event is raised.
The UploadProgressEvent is fired as data is uploaded to S3. The delegates attached to the event will be passed information detailing how much data has been uploaded as well as how much will be uploaded.
public event EventHandler<UploadProgressArgs> UploadProgressEvent
Event Type
Remarks
Subscribe to this event if you want to receive
UploadProgressEvent notifications. Here is how:
- Define a method with a signature similar to this one:
private void displayProgress(object sender, UploadProgressArgs args)
{
Console.WriteLine(args);
}
- Add this method to the UploadProgressEvent delegate's invocation list
TransferUtilityUploadRequest request = new TransferUtilityUploadRequest();
request.UploadProgressEvent += displayProgress;