Amazon.Glacier.Transfer.ArchiveTransferManager.UploadAsync C# (CSharp) Метод

UploadAsync() публичный Метод

Uploads the specified file to Amazon Glacier for archival storage in the specified vault in the specified user's account. For small archives, this method uploads the archive directly to Glacier. For larger archives, this method uses Glacier's multipart upload API to split the upload into multiple parts for better error recovery if any errors are encountered while streaming the data to Amazon Glacier.

public UploadAsync ( string vaultName, string archiveDescription, string filepath, UploadOptions options ) : Task
vaultName string The name of the vault to download the archive from.
archiveDescription string A description for the archive.
filepath string The file path to the file to upload.
options UploadOptions Additional options that can be used for the upload.
Результат Task
        public async Task<UploadResult> UploadAsync(string vaultName, string archiveDescription, string filepath, UploadOptions options)
        {
            FileInfo fi = new FileInfo(filepath);
            BaseUploadCommand command;
            if (fi.Length > MULTIPART_UPLOAD_SIZE_THRESHOLD)
                command = new MultipartUploadCommand(this, vaultName, archiveDescription, filepath, options);
            else
                command = new SinglepartUploadCommand(this, vaultName, archiveDescription, filepath, options);
            await command.ExecuteAsync().ConfigureAwait(false);
            return command.UploadResult;
        }

Same methods

ArchiveTransferManager::UploadAsync ( string vaultName, string archiveDescription, string filepath ) : Task