updated naming convention meta and pdf fixes

This commit is contained in:
2024-05-20 12:42:53 +01:00
parent 206d08fa5e
commit d829213a6a
16 changed files with 254 additions and 143 deletions
+25 -1
View File
@@ -376,10 +376,22 @@ export const createRepPDFBlob = async (
const uploadBlobResponse = await blockBlobClient.uploadStream(content);
let whichLocation =
repName.indexOf("_IP_") > 0
? "Interested Party Representations"
: repName.indexOf("_Statement_") > 0
? "Main Party Statements"
: repName.indexOf("_Questionnaire_") > 0
? "Main Party Questionnaire"
: repName.indexOf("_Comments") > 0
? "Main Party Comments"
: "default";
const tags = {
containerid: containerName,
caseID: caseID,
blobType: "Appeal PDF",
blobType: "Representation PDF",
ishareLocation: whichLocation,
};
//console.log("the tags:", tags);
@@ -466,11 +478,23 @@ export const uploadFile = async (formContent, containerName, foldername) => {
"\n////////////////////////////"
);
let whichLocation =
files[prop][0].fieldName.indexOf("_IP_") > 0
? "Interested Party Representations"
: files[prop][0].fieldName.indexOf("_Statement_") > 0
? "Main Party Statements"
: files[prop][0].fieldName.indexOf("_Questionnaire_") > 0
? "Main Party Questionnaire"
: files[prop][0].fieldName.indexOf("_Comments_") > 0
? "Main Party Comments"
: "default";
const tags = {
containerid: containerName,
caseID: foldername.split("/")[0],
documentType: files[prop][0].fieldName.split(".")[1],
blobType: "RepresentationFile",
ishareLocation: whichLocation,
};
const withTags = await blockBlobClient.setTags(tags);
const withMeta = await blockBlobClient.setMetadata(tags);