Skip to content

Commit ef67ada

Browse files
committed
Make File Name prop optional
1 parent 4bfe358 commit ef67ada

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/quickbooks/actions/download-pdf/download-pdf.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
name: 'Download PDF',
66
description: 'Download an invoice, bill, purchase order, etc. as a PDF and save it in the temporary file system for use in a later step.',
77
key: 'download_pdf',
8-
version: '0.0.9',
8+
version: '0.1.1',
99
type: 'action',
1010
props: {
1111
quickbooks,
@@ -28,7 +28,8 @@ module.exports = {
2828
},
2929
file_name: {
3030
type: 'string',
31-
label: 'File Name',
31+
label: 'File Name (Optional)',
32+
optional: true,
3233
},
3334
},
3435
methods: {
@@ -42,7 +43,7 @@ module.exports = {
4243
responseType: 'arraybuffer',
4344
})
4445

45-
const file_path = '/tmp/' + file_name
46+
const file_path = '/tmp/' + (file_name || id)
4647
fs.writeFileSync(file_path, file)
4748

4849
return file_path

0 commit comments

Comments
 (0)