Skip to content

Commit 4e5b834

Browse files
fix(onedrive): incorrect canonical param (#1966)
* fix(onedrive): incorrect canonical param * fix download file * fix * fix * Revert "fix" This reverts commit f68ccd7. * Revert "fix" This reverts commit f3d8ace.
1 parent 304fb28 commit 4e5b834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/sim/blocks/blocks/onedrive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
284284
id: 'downloadFileName',
285285
title: 'File Name Override',
286286
type: 'short-input',
287-
canonicalParamId: 'fileName',
288287
placeholder: 'Optional: Override the filename',
289288
condition: { field: 'operation', value: 'download' },
290289
},
@@ -350,7 +349,7 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
350349
}
351350
},
352351
params: (params) => {
353-
const { credential, folderId, fileId, mimeType, values, ...rest } = params
352+
const { credential, folderId, fileId, mimeType, values, downloadFileName, ...rest } = params
354353

355354
let parsedValues
356355
try {
@@ -367,6 +366,7 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
367366
fileId: fileId || undefined,
368367
pageSize: rest.pageSize ? Number.parseInt(rest.pageSize as string, 10) : undefined,
369368
mimeType: mimeType,
369+
...(downloadFileName && { fileName: downloadFileName }),
370370
}
371371
},
372372
},

0 commit comments

Comments
 (0)