Skip to main content

azure-storage@2.0.5

downloadBlob(blobName, [options])
getBlobProperties(blobName, options)
uploadBlob(blobName, content, uploadOptions, [options])

This adaptor exports the following from common:

dataPath()
dataValue()
dateFns
each()
field()
fields()
fn()
fnIf()
http
lastReferenceValue()
merge()
sourceValue()

Functions

downloadBlob

downloadBlob(blobName, [options]) ⇒ Operation

Download a blob from Azure Blob Storage.

ParamTypeDefaultDescription
blobNamestringName of the blob to download.
[options]Object{}Additional options for the download process.

Example

downloadBlob('mycontainer', 'myblob.txt', { downloadAs: 'string' })

getBlobProperties

getBlobProperties(blobName, options) ⇒ Operation

Get properties of a blob in Azure Blob Storage.

ParamTypeDescription
blobNamestringName of the blob to get properties for.
optionsstringAdditional options for the getBlobProperties process.

Example

getBlobProperties('mycontainer', 'myblob.txt')

uploadBlob

uploadBlob(blobName, content, uploadOptions, [options]) ⇒ Operation

Upload content to Azure Blob Storage.

ParamTypeDefaultDescription
blobNamestringName of the blob to create or replace.
contentstringContent to upload.
uploadOptionsobjectSee BlockBlobUploadOptions in Azure Blob Storage docs
[options]Object{}Additional options for the upload process.
[options.createContainer]booleanfalseWhether to create the container if it doesn't exist.
[options.overwrite]booleanfalseWhether to overwrite an existing blob with the same name.
[options.containerName]stringContainer name. Overrides state.configuration.

Example

uploadBlob('mycontainer', 'myblob.txt', {foo:"bar"}, { blobHTTPHeaders: { blobContentType: 'application/json' } })