DriveClientUploadFileAsync(FileInfo, File, ActionIUploadProgress, CancellationToken, String) Method

Asynchronously uploads a file in the specified folder.

Definition

Namespace: DevCase.ThirdParty.Google.Drive
Assembly: DevCase.net48.ThirdParty.GoogleServices (in DevCase.net48.ThirdParty.GoogleServices.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public Task<KeyValuePair<ResumableUpload, File>> UploadFileAsync(
	FileInfo srcFile,
	File dstFile,
	Action<IUploadProgress> progressHandler,
	CancellationToken cancellationToken,
	params string[] parentFolderIds
)

Parameters

srcFile  FileInfo
The source file to upload.
dstFile  File
The metadata of the file being uploaded.

In the metadata you can specify values like the destination filename, description, folder destination, etc...

progressHandler  ActionIUploadProgress
A event handler that will receive progress changes of the upload operation.
cancellationToken  CancellationToken
A cancellation token to cancel the upload operation.
parentFolderIds  String
The identifier of the parent folder(s) where to upload the file.

This paramenter can be empty (nul).

Return Value

TaskKeyValuePairResumableUpload, File
The resulting TaskTResult.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also