Skip to content

Commit

Permalink
IMN-836 - Fix file Utils zip file document fetching (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor-K authored Sep 26, 2024
1 parent 03e45af commit 9e58fc5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/backend-for-frontend/src/utilities/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ export async function createDescriptorDocumentZipFile(
// Add interface file to the zip
const interfaceFile = await fileManager.get(
s3BucketName,
fileManager.buildS3Key(
interfaceDocument.path,
interfaceDocument.id,
interfaceDocument.name
),
interfaceDocument.path,
logger
);

Expand All @@ -186,8 +182,7 @@ export async function createDescriptorDocumentZipFile(
// Add descriptor's document files to the zip
const documentFilesContent: FileData[] = await Promise.all(
descriptor.docs.map(async (doc) => {
const s3Key = fileManager.buildS3Key(doc.path, doc.id, doc.name);
const file = await fileManager.get(s3BucketName, s3Key, logger);
const file = await fileManager.get(s3BucketName, doc.path, logger);
return { id: doc.id, file };
})
);
Expand Down

0 comments on commit 9e58fc5

Please sign in to comment.