kalai-attach 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kalai-attach",
|
|
3
3
|
"description": "CAP cds-plugin providing image and attachment storing out-of-the-box.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.16",
|
|
5
5
|
"repository": "capjsattachments-kalai",
|
|
6
6
|
"author": "Kalai",
|
|
7
7
|
"homepage": "https://github.com/Kalaikovan-airdit",
|
|
@@ -12,7 +12,7 @@ module.exports = class AzureAttachmentsService extends require("./object-store")
|
|
|
12
12
|
*/
|
|
13
13
|
async retrieveClient() {
|
|
14
14
|
try {
|
|
15
|
-
const { container_name, connection_string, sas_token
|
|
15
|
+
const { container_name, connection_string, sas_token } = await fetchfromDestination('AISP-ATTACHMENTS')
|
|
16
16
|
|
|
17
17
|
const container_uri = "https://aairdoc9262.blob.core.windows.net"
|
|
18
18
|
|
|
@@ -22,8 +22,8 @@ module.exports = class AzureAttachmentsService extends require("./object-store")
|
|
|
22
22
|
const newAzureCredentials = {
|
|
23
23
|
containerClient,
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
this.clientsCache.set(newAzureCredentials)
|
|
25
|
+
const tenant = cds.context.tenant || 'default';
|
|
26
|
+
this.clientsCache.set(tenant, newAzureCredentials);
|
|
27
27
|
|
|
28
28
|
LOG.debug('Azure Blob Storage client has been created successful', {
|
|
29
29
|
|
|
@@ -33,8 +33,7 @@ module.exports = class AzureAttachmentsService extends require("./object-store")
|
|
|
33
33
|
} catch (error) {
|
|
34
34
|
LOG.error(
|
|
35
35
|
'Failed to create tenant-specific Azure Blob Storage client', error,
|
|
36
|
-
'Check Service Manager and Azure Blob Storage instance configuration'
|
|
37
|
-
{ tenantID })
|
|
36
|
+
'Check Service Manager and Azure Blob Storage instance configuration')
|
|
38
37
|
throw error
|
|
39
38
|
}
|
|
40
39
|
}
|