Azure Store based on the Append Blob Client Azure Blob AppendBlobClient.
In Node.js (16.0+), install with npm:
npm install @tus/azure-store
const {Server} = require('@tus/server')
const {AzureStore} = require('@tus/azure-store')
const server = new Server({
path: '/files',
datastore: new AzureStore({
account: process.env.AZURE_ACCOUNT_ID,
accountKey: process.env.AZURE_ACCOUNT_KEY,
containerName: process.env.AZURE_CONTAINER_NAME,
}),
})
// ...
This package exports AzureStore
. There is no default export.
Creates a new azure store with options.
Azure account ID (string
).
Azure account key (string
).
Azure storage container name (string
).
Provide your own cache solution for the metadata of uploads (KvStore
) to reduce the calls to storage server.
Default is (MemoryKvStore
) which stores the data in memory.
The tus protocol supports optional extensions. Below is a table of the supported
extensions in @tus/azure-store
. More will be added in the future releases.
Extension | @tus/file-store |
---|---|
Creation | ✅ |
Creation With Upload | ✅ |
Expiration | ❌ |
Checksum | ❌ |
Termination | ❌ |
Concatenation | ❌ |
This package is fully typed with TypeScript.
This package requires Node.js 16.0+.
See
contributing.md
.