feat(storage-azure): expose storage client (#7069)

Expose the storage client for re-use.

```ts
import { getStorageClient } from '@payloadcms/storage-azure'
import { getPayload } from 'payload'


const awaitedConfig = await importConfig('./config.ts')
const payload = await getPayload({ config: awaitedConfig })


// Get internal azure blob storage client
const storageClient = getStorageClient({
  connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
  containerName: process.env.AZURE_STORAGE_CONTAINER_NAME,
})
```
This commit is contained in:
Elliot DeNolf
2024-07-09 10:26:13 -04:00
committed by GitHub
parent b4bc7dae11
commit f46ea01df0
4 changed files with 31 additions and 12 deletions

View File

@@ -53,6 +53,7 @@
"dotenv": "16.4.5",
"eslint-plugin-playwright": "1.6.2",
"execa": "5.1.1",
"file-type": "17.1.6",
"http-status": "1.6.2",
"jwt-decode": "4.0.0",
"lexical": "0.15.0",