Azure Blob Storage

Frends.AzureBlobStorage.UploadBlob / 4.3.0

Summary

Copies files from the agent's file system into a container, selecting them by pattern, optionally compressing them and tagging the result.

Typical use — publishing files a Process produced on disk; the write Task is the counterpart for content still in memory

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0

Input parameters.

Name Type Default Example Description
ContainerName String examplecontainer

Name of the Azure Blob Storage container. Task will convert all letters to lowercase.

SourceType UploadSourceType File UploadSourceType.File

Source type.

Possible values:

  • File: Source type.

  • Directory: Source type.

SourceDirectory String c:\temp

Upload all files from the given directory.

SearchPattern String *.*, Search*.*, *.xml

The search string is used to match against the names of files in the path. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions

SourceFile String c:\temp\testfile.txt

This file will be uploaded as a new blob or appended into the target blob in the Append process.

BlobName String Renamed.txt

Name of the blob. If left empty, the blob's name will be the same as the source file.

BlobFolderName String ExampleDir

Name of the blob folder. If left empty, blob folder's name will be the same as source directory (e.g., 'Example' in C:\temp\Example).

ContentsOnly Boolean False false

Use a stream to read the file's content

Compress Boolean False false

Gzip compression only works when transferring stream content (see Input.ContentsOnly). Note that it could be a good idea to rename the blob using Destination.BlobName (e.g., renaming 'examplefile.txt' to 'examplefile.gz') so that the blob won't be named as 'examplefile.txt.gz

ActionOnExistingFile OnExistingFile Throw OnExistingFile.Throw

How the existing blob will be handled. Append: Append the blob with Input.SourceFile. Block and Page blobs will be downloaded as a temp file which will be deleted after local append and upload processes are complete. No downloading needed for Append Blob. Overwrite: The original blob will be deleted before uploading the new one. Throw: Depending on Options.ThrowErrorOnFailure, throw an exception or Result will contain an error message instead of the blob's URL.

Possible values:

  • Throw: Throw an error.

  • Overwrite: Overwrite with source file.

  • Append: Append blob with 'Source File'. Block and Page blob will be downloaded as temp file which will be deleted after local append and reupload processes are complete. No downloading needed for Append Blob.

Tags Tag[] {name, value}

Tags for the block or append blob. NOTE: Minimum access right to work with OAuth2 is 'Storage Blob Data Owner'

An unhandled error has occurred. Reload 🗙