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
endpointIUploadEndpointThe blob endpoint.
pathstringThe path of the file to read the upload data from.
mimeTypestringThe MIME type of the data to upload.
cancellationTokenCancellationTokenUsed to cancel the request.
Returns
Exceptions
- IOException
Failed to read the file.
- InvalidDataException
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.