AzureStorageAlias.

UploadFileToBlob(ICakeContext, AzureStorageSettings, FilePath) Method

Summary

Uploads a file to Azure Blob Storage.
Assembly
Cake.AzureStorage.dll
Namespace
Cake.AzureStorage
Containing Type
AzureStorageAlias

Syntax

public static void UploadFileToBlob(this ICakeContext context, AzureStorageSettings settings, FilePath fileToUpload)

Examples

Task("PackageNoSettings")
 .Does(() => {
  var settings = new AzureStorageSettings();
  settings.AccountName = "AccountName";
  settings.Key = "API KEY";
  settings.ContainerName = "ContainerName";
  settings.BlobName = "BlobName";
  UploadFileToBlob(settings, GetFile("./path/to/file/to/upload"));
});

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings AzureStorageSettings Azure Storage Settings.
fileToUpload FilePath File to upload to Azure storage.

Return Value

Type Description
void