fix: putPdfFile to always include file extension

This commit is contained in:
Mythie
2024-12-02 22:06:53 +11:00
parent 4326e27a2a
commit f27d0f342c
4 changed files with 17 additions and 7 deletions

View File

@ -114,8 +114,14 @@ export const sendDocument = async ({
formValues: document.formValues as Record<string, string | number | boolean>,
});
let fileName = document.title;
if (!document.title.endsWith('.pdf')) {
fileName = `${document.title}.pdf`;
}
const newDocumentData = await putPdfFile({
name: document.title,
name: fileName,
type: 'application/pdf',
arrayBuffer: async () => Promise.resolve(prefilled),
});