@devries-cameron20 / composio-1 / commits / 3b2ad6d31
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Fix file upload ts doc snippets (#2414)

Musthaq Ahamad committed Jan 19, 2026 at 17:56 UTC 3b2ad6d31530cf75cc7b26a742be1d9bbabc78d9
1 file changed +16 -6
ts/packages/core/src/models/Files.node.ts
+16 -6
@@ -16,12 +16,22 @@ export class Files {
16 }
17
18 /**
19 - * Upload a file to S3 and return the file data.
20 - * @param filePath - The path to the file to upload or a URL of the file to upload.
21 - * @param toolSlug - The slug of the tool that is uploading the file.
22 - * @param toolkitSlug - The slug of the toolkit that is uploading the file.
23 - * @returns The file data.
24 - */
19 + * Upload a file and return the file data.
20 + *
21 + * @param params - The upload parameters.
22 + * @param {File | string} params.file - The path to the file to upload, a URL of the file, or a File object.
23 + * @param {string} params.toolSlug - The slug of the tool that is uploading the file.
24 + * @param {string} params.toolkitSlug - The slug of the toolkit that is uploading the file.
25 + * @returns {Promise<FileUploadData>} The uploaded file data.
26 + *
27 + * @example
28 + *
29 + * const fileData = await composio.files.upload({
30 + * file: 'path/to/file.pdf',
31 + * toolSlug: 'google_drive_upload',
32 + * toolkitSlug: 'google_drive'
33 + * });
34 + * */
35 async upload({
36 file,
37 toolSlug,