mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(onedrive): incorrect canonical param (#1966)
* fix(onedrive): incorrect canonical param * fix download file * fix * fix * Revert "fix" This reverts commitf68ccd75fd. * Revert "fix" This reverts commitf3d8acee7d.
This commit is contained in:
@@ -284,7 +284,6 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
|
||||
id: 'downloadFileName',
|
||||
title: 'File Name Override',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'fileName',
|
||||
placeholder: 'Optional: Override the filename',
|
||||
condition: { field: 'operation', value: 'download' },
|
||||
},
|
||||
@@ -350,7 +349,7 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
|
||||
}
|
||||
},
|
||||
params: (params) => {
|
||||
const { credential, folderId, fileId, mimeType, values, ...rest } = params
|
||||
const { credential, folderId, fileId, mimeType, values, downloadFileName, ...rest } = params
|
||||
|
||||
let parsedValues
|
||||
try {
|
||||
@@ -367,6 +366,7 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
|
||||
fileId: fileId || undefined,
|
||||
pageSize: rest.pageSize ? Number.parseInt(rest.pageSize as string, 10) : undefined,
|
||||
mimeType: mimeType,
|
||||
...(downloadFileName && { fileName: downloadFileName }),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user