diff --git a/src/app/modules/submission/encrypt-submission/encrypt-submission.middleware.ts b/src/app/modules/submission/encrypt-submission/encrypt-submission.middleware.ts index e1a950f9f3..5c12a17560 100644 --- a/src/app/modules/submission/encrypt-submission/encrypt-submission.middleware.ts +++ b/src/app/modules/submission/encrypt-submission/encrypt-submission.middleware.ts @@ -231,7 +231,11 @@ export const scanAttachments = async ( meta: { ...logMeta, responseMetadata: data?.$metadata, - returnPayload: data?.Payload, + returnPayload: Buffer.from(data?.Payload ?? '').toString(), + logResult: Buffer.from( + data?.LogResult ?? '', + 'base64', + ).toString(), }, }) return okAsync(true)