Class UploadEndpointExtensions
Provides extension methods for IUploadEndpoint.
public static class UploadEndpointExtensions
- Inheritance
-
UploadEndpointExtensions
- Inherited Members
Methods
UploadFromAsync(IUploadEndpoint, string, string?, CancellationToken)
Uploads data to the endpoint from a file.
public static Task UploadFromAsync(this IUploadEndpoint endpoint, string path, string? mimeType = null, CancellationToken cancellationToken = default)
Parameters
endpoint
IUploadEndpointThe blob endpoint.
path
stringThe path of the file to read the upload data from.
mimeType
stringThe MIME type of the data to upload.
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- IOException
Failed to read the file.
- InvalidDataException
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.