src/Picturepark.SDK.V1/Partial/TransferClient.cs
/// <summary>Uploads multiple files from the filesystem.</summary>
/// <param name="transferName">The name of the created transfer.</param>
/// <param name="files">The file paths on the filesystem with optional overrides.</param>
/// <param name="uploadOptions">The file upload options.</param>
/// <param name="timeout">The timeout to wait for completion.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The created transfer object.</returns>
Uploads multiple files from the filesystem.
Uploads multiple files from the filesystem .
public async Task<CreateTransferResult> UploadFilesAsync(string transferName, IEnumerable<FileLocations> files, UploadOptions uploadOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var fileLocations = files as FileLocations[] ?? files.ToArray();
            var result = await CreateAndWaitForCompletionAsync(transferName, fileLocations, timeout, cancellationToken).ConfigureAwait(false);
            await UploadFilesAsync(result.Transfer, fileLocations, uploadOptions, timeout, cancellationToken).ConfigureAwait(false);
            return result;
        }
public async Task < CreateTransferResult > UploadFilesAsync ( string transferName , IEnumerable < FileLocations > files , UploadOptions uploadOptions , TimeSpan ? timeout = null , CancellationToken cancellationToken = default ( CancellationToken ) ) { var fileLocations = files as FileLocations [ ] ?? files . ToArray ( ) ; var result = await CreateAndWaitForCompletionAsync ( transferName , fileLocations , timeout , cancellationToken ) . ConfigureAwait ( false ) ; await UploadFilesAsync ( result . Transfer , fileLocations , uploadOptions , timeout , cancellationToken ) . ConfigureAwait ( false ) ; return result ; }
Uploads multiple files from the filesystem.
Uploads multiple files from the filesystem .
The created transfer object.
The created transfer object .
transferName
string
The name of the created transfer.
The name of the created transfer .
files
IEnumerable<FileLocations>
The file paths on the filesystem with optional overrides.
The file paths on the filesystem with optional overrides .
uploadOptions
UploadOptions
The file upload options.
The file upload options .
timeout
TimeSpan?
The timeout to wait for completion.
The timeout to wait for completion .
cancellationToken
CancellationToken
The cancellation token.
The cancellation token .