Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "zoho_workdrive-download-file",
name: "Download File to Tmp Direcory",
description: "Download a file to the /tmp directory. [See the documentation](https://workdrive.zoho.com/apidocs/v1/filesfolders/downloadserverfile)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
app,
Expand Down Expand Up @@ -78,11 +78,12 @@ export default {
},
},
async run({ $ }) {
const fileName = this.fileName || this.fileId.label;
const fileId = this.fileId?.value ?? this.fileId;
const fileName = this.fileName ?? this.fileId?.label ?? "file";
const filePath = getFilePath(fileName);

const fileContent = await this.downloadFile({
fileId: this.fileId.value,
fileId,
});

fs.writeFileSync(filePath, fileContent);
Expand Down
2 changes: 1 addition & 1 deletion components/zoho_workdrive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/zoho_workdrive",
"version": "0.2.1",
"version": "0.2.2",
"description": "Pipedream Zoho WorkDrive Components",
"main": "zoho_workdrive.app.mjs",
"keywords": [
Expand Down
Loading