ParallelModelBlobClient.UploadAsync method
Uploads a local file as a new blob associated with the specified model.
public Task<ParallelModelResponse> UploadAsync(Guid modelId, string filePath, string encryptionKey,
string name, string description = "", string recordType = "Generic", string accessTier = "Hot",
IEnumerable<string>? tags = null, TimeSpan? timeout = default,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| modelId | The non-empty identifier of the model. |
| filePath | The path of the local file to upload. |
| encryptionKey | The encryption key supplied with the blob request. |
| name | The name of the blob record. |
| description | The description of the blob record, which may be empty. |
| recordType | The record type of the blob. |
| accessTier | The storage access tier of the blob. |
| tags | The tags associated with the blob, if provided. |
| timeout | The optional timeout for the operation. |
| cancellationToken | The token used to cancel the operation. |
Return Value
A task containing the upload response.
Exceptions
| exception | condition |
|---|---|
| ParallelModelConfigurationException | The model identifier is empty or the request configuration is invalid. |
| ParallelModelFileTransferException | The source file path is invalid, the file does not exist, or the file cannot be read. |
See Also
- record ParallelModelResponse
- class ParallelModelBlobClient
- namespace ParallelModel.Sdk.Shared.Blob