Skip to content

Commit d8e872a

Browse files
committed
pdf4me: readding std filename check to action
1 parent e89430f commit d8e872a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/pdf4me/actions/convert-to-pdf/convert-to-pdf.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ export default {
2323
},
2424
},
2525
async run({ $ }) {
26+
const filename = utils.checkForExtension(this.filename, "pdf");
2627
const fileContent = await utils.getBase64File(this.filePath);
2728

2829
const response = await this.pdf4me.convertToPdf({
2930
$,
3031
data: {
3132
docContent: fileContent,
32-
docName: this.filename,
33+
docName: filename,
3334
},
3435
responseType: "arraybuffer",
3536
});

0 commit comments

Comments
 (0)