updated storage account stuff to take auth id

This commit is contained in:
2022-08-26 15:19:34 +01:00
parent 671d49c394
commit 862a953aae
18 changed files with 346 additions and 133 deletions
+19 -7
View File
@@ -14,10 +14,15 @@ ApiProxy.use(middleware);
ApiProxy.post(async (req, res) => {
var checkHash = req.query.hash;
console.log(JSON.parse(req.body.appealData));
console.log(req.files);
// console.log(JSON.stringify(req.body));
// console.log(JSON.stringify(req.body.appealData));
// console.log(req.files);
const appealData = JSON.parse(req.body.appealData);
const appealData = req.body.appealData;
const containerID = req.body.containerID;
const casefolderID = req.body.casefolderID;
console.log("there are files:", Object.keys(req.files).length);
// var checkquerypath = "/api/file/upload";
@@ -25,11 +30,18 @@ ApiProxy.post(async (req, res) => {
// console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
// if (hashAPIPath(checkquerypath) == "?hash=" + checkHash) {
createContainer(appealData.pinswg_name.trim()).then((containerName) => {
createBlob(appealData, containerName).then((data) => {
uploadFile(req.files, containerName, data);
});
//createContainer(containerID).then((containerName) => {
console.log(
"does this et folder name:",
appealData.pinswg_name,
casefolderID
);
createBlob(appealData, containerID, casefolderID).then((data) => {
Object.keys(req.files).length > 0 &&
uploadFile(req.files, containerID, casefolderID);
});
//});
return res.status(200).json({ data: "success" });
// } else {