Initializes a new client to interact with Azure Blob Storage.
Connection options, passed as an object with interface AzureStorageConnectionObject
, or as a connection string (e.g. as returned from the Azure Portal)
Returns an instance of the client object, to interact with the cloud provider directly
Returns the name of the provider
Create a container on the server, choosing whether to use the "ifNotExists" method or not
Name of the container
If true, use the "ifNotExists" method variant
Dictionary with options for creating the container, including the access level (defaults to 'none' if not specified)
Promise that resolves once the container has been created. The promise doesn't contain any meaningful return value.
Create a container on the server.
Name of the container
Dictionary with options for creating the container, including the access level (defaults to 'none' if not specified)
Promise that resolves once the container has been created. The promise doesn't contain any meaningful return value.
Removes a container from the server
Name of the container
Promise that resolves once the container has been removed
Removes an object from the server
Name of the container
Path of the object, inside the container
Promise that resolves once the object has been removed
Create a container on the server if it doesn't already exist.
Name of the container
Dictionary with options for creating the container, including the access level (defaults to 'none' if not specified)
Promise that resolves once the container has been created
Requests an object from the server. The method returns a Promise that resolves to a Readable Stream containing the data.
Name of the container
Path of the object, inside the container
Readable Stream containing the object's data
Requests an object from the server. The method returns a Promise that resolves to a Buffer object containing the data from the server.
Name of the container
Path of the object, inside the container
Buffer containing the object's data
Requests an object from the server. The method returns a Promise that resolves to a string containing the data from the server.
Name of the container
Path of the object, inside the container
Optional encoding for the string; defaults to utf8
String containing the object's data
Check if a container exists.
Name of the container
Promises that resolves with a boolean indicating if the container exists.
Lists all containers belonging to the user
Promise that resolves with an array of all the containers
Returns a list of objects with a given prefix (folder). The list is not recursive, so prefixes (folders) are returned as such.
Name of the container
Prefix (folder) inside which to list objects
List of elements returned by the server
Returns a URL that clients (e.g. browsers) can use to request an object from the server with a GET request, even if the object is private.
Name of the container
Path of the object, inside the container
Expiry time of the URL, in seconds (default: 1 day)
Promise that resolves with the pre-signed URL for GET requests
Returns a URL that clients (e.g. browsers) can use for PUT operations on an object in the server, even if the object is private.
Notes on using presigned URLs to upload files to Azure Storage using PUT:
X-MS-Blob-Type: BlockBlob
header for uploads to succeedName of the container
Path where to store the object, inside the container
Key-value pair of options used by providers, including the metadata
dictionary
Expiry time of the URL, in seconds (default: 1 day)
Promise that resolves with the pre-signed URL for GET requests
Returns a presigned URL for the specific operation.
Operation: "getObject" or "putObject"
Name of the container
Path of the target object, inside the container
Additional headers that are required
Expiry time of the URL, in seconds (default: 1 day)
Promise that resolves with the pre-signed URL for the specified operation
Uploads a stream to the object storage server
Name of the container
Path where to store the object, inside the container
Object data or stream. Can be a Stream (Readable Stream), Buffer or string.
Key-value pair of options used by providers, including the metadata
dictionary
Promise that resolves once the object has been uploaded
Generated using TypeDoc
Client to interact with Azure Blob Storage.