Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(application-inheritance-report): Fetch s3 filename from correct l… #17351

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ export class InheritanceReportService extends BaseTemplateApiService {
attachments.push(
...(await Promise.all(
answers.heirsAdditionalInfoPrivateTransferFiles.map(async (file) => {
const content = await this.getFileContentBase64(file.key)
const filename = (
application.attachments as {
[key: string]: string
}
)[file.key]
const content = await this.getFileContentBase64(filename)
return {
name: file.name,
content,
Expand All @@ -128,7 +133,12 @@ export class InheritanceReportService extends BaseTemplateApiService {
attachments.push(
...(await Promise.all(
answers.heirsAdditionalInfoFilesOtherDocuments.map(async (file) => {
const content = await this.getFileContentBase64(file.key)
const filename = (
application.attachments as {
[key: string]: string
}
)[file.key]
const content = await this.getFileContentBase64(filename)
return {
name: file.name,
content,
Expand Down Expand Up @@ -178,7 +188,10 @@ export class InheritanceReportService extends BaseTemplateApiService {
)
return fileContent || ''
} catch (e) {
this.logger.warn('[estate]: Failed to get file content - ', e)
this.logger.warn(
'[inherhitance-report]: Failed to get file content - ',
e,
)
return 'err'
}
}
Expand Down
Loading