Skip to content

Commit 11f547e

Browse files
author
aadamgough
committed
reverted back to bas64 string
1 parent c46dd53 commit 11f547e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apps/sim/tools/google_drive/download.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,15 @@ export const downloadTool: ToolConfig<GoogleDriveToolParams, GoogleDriveDownload
199199
hasRevisions: !!metadata.revisions?.length,
200200
})
201201

202+
const base64Data = fileBuffer.toString('base64')
203+
202204
return {
203205
success: true,
204206
output: {
205207
file: {
206208
name: resolvedName,
207209
mimeType: finalMimeType,
208-
data: fileBuffer,
210+
data: base64Data,
209211
size: fileBuffer.length,
210212
},
211213
metadata,
@@ -227,7 +229,7 @@ export const downloadTool: ToolConfig<GoogleDriveToolParams, GoogleDriveDownload
227229
properties: {
228230
name: { type: 'string', description: 'File name' },
229231
mimeType: { type: 'string', description: 'MIME type of the file' },
230-
data: { type: 'string', description: 'File content as Buffer' },
232+
data: { type: 'string', description: 'File content as base64-encoded string' },
231233
size: { type: 'number', description: 'File size in bytes' },
232234
},
233235
},

apps/sim/tools/google_drive/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export interface GoogleDriveDownloadResponse extends ToolResponse {
304304
file: {
305305
name: string
306306
mimeType: string
307-
data: Buffer
307+
data: string
308308
size: number
309309
}
310310
metadata: GoogleDriveFile

0 commit comments

Comments
 (0)