Skip to content

Commit a94d5f3

Browse files
custom expressions do not pass label
1 parent 4fcc4f1 commit a94d5f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/zoho_workdrive/actions/download-file/download-file.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "zoho_workdrive-download-file",
88
name: "Download File to Tmp Direcory",
99
description: "Download a file to the /tmp directory. [See the documentation](https://workdrive.zoho.com/apidocs/v1/filesfolders/downloadserverfile)",
10-
version: "0.0.2",
10+
version: "0.0.3",
1111
type: "action",
1212
props: {
1313
app,
@@ -78,11 +78,12 @@ export default {
7878
},
7979
},
8080
async run({ $ }) {
81-
const fileName = this.fileName || this.fileId.label;
81+
const fileId = this.fileId?.value ?? this.fileId;
82+
const fileName = this.fileName ?? this.fileId?.label ?? "file";
8283
const filePath = getFilePath(fileName);
8384

8485
const fileContent = await this.downloadFile({
85-
fileId: this.fileId.value,
86+
fileId,
8687
});
8788

8889
fs.writeFileSync(filePath, fileContent);

0 commit comments

Comments
 (0)