Skip to main content

azure-storage@1.0.1

Functions

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

The following functions are exported from the common adaptor:

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

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' } })