Merged PR 1236: update to use SAS key
update to use SAS key Related work items: #12190
This commit is contained in:
+10
-1
@@ -70,7 +70,11 @@ export const createContainerSas = async (containerName) => {
|
|||||||
expiresOn: TEN_MINUTES_AFTER_NOW,
|
expiresOn: TEN_MINUTES_AFTER_NOW,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(JSON.stringify(sasOptions));
|
console.log(
|
||||||
|
"\n////////////////////////\nsasOptions :",
|
||||||
|
JSON.stringify(sasOptions),
|
||||||
|
"\n////////////////////////"
|
||||||
|
);
|
||||||
|
|
||||||
const sasToken = generateBlobSASQueryParameters(
|
const sasToken = generateBlobSASQueryParameters(
|
||||||
sasOptions,
|
sasOptions,
|
||||||
@@ -78,6 +82,11 @@ export const createContainerSas = async (containerName) => {
|
|||||||
accountName
|
accountName
|
||||||
).toString();
|
).toString();
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"\n////////////////////////\nsasToken :",
|
||||||
|
sasToken,
|
||||||
|
"\n////////////////////////"
|
||||||
|
);
|
||||||
return sasToken;
|
return sasToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
createContainer,
|
createContainer,
|
||||||
|
createContainerSas,
|
||||||
getContainers,
|
getContainers,
|
||||||
getBlobs,
|
getBlobs,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
@@ -21,7 +22,7 @@ ApiProxy.get(async (req, res) => {
|
|||||||
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await createContainer(containerName)
|
await createContainerSas(containerName)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
return res.status(200).json({ data: "success" });
|
return res.status(200).json({ data: "success" });
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user