Skip to content

Commit 06bf99f

Browse files
committed
fix(vanta): keep mimeType an ordinary upload parameter
`mimeType` was marked hidden, but `visibility: 'hidden'` is reserved for system-injected params such as OAuth tokens. It also left the base64 upload path with no way to set a content type, since `fileContent` is hidden too.
1 parent a181906 commit 06bf99f

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

apps/docs/content/docs/en/integrations/vanta.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ Upload an evidence file to a Vanta document. Requires credentials with the vanta
331331
| `documentId` | string | Yes | Unique ID of the document to attach the file to |
332332
| `file` | file | No | The evidence file to upload |
333333
| `fileName` | string | No | Optional file name override |
334+
| `mimeType` | string | No | MIME type of the file \(e.g., application/pdf\). Applies only to the base64 upload path; a file from the File input always sends the content type resolved from storage. |
334335
| `description` | string | No | Description of the uploaded evidence \(e.g., "Q3 access review evidence"\) |
335336
| `effectiveAtDate` | string | No | ISO 8601 date indicating when the document is effective from |
336337

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/vanta/operation-input.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ describe('Vanta internal tool declarations', () => {
1515
}
1616
})
1717

18+
it('leaves mimeType an ordinary operation parameter the base64 path can set', () => {
19+
expect(vantaUploadDocumentFileTool.params.mimeType.visibility).toBe('user-or-llm')
20+
})
21+
22+
it('hides only the system-injected file content', () => {
23+
expect(vantaUploadDocumentFileTool.params.fileContent.visibility).toBe('hidden')
24+
})
25+
1826
it('preserves resolved secrets, variables, and protected file references verbatim', () => {
1927
const file = { key: 'workspace/file.txt', name: 'file.txt', size: 4 }
2028
expect(

apps/sim/tools/vanta/upload_document_file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const vantaUploadDocumentFileTool: InternalToolConfig<
6262
mimeType: {
6363
type: 'string',
6464
required: false,
65-
visibility: 'hidden',
65+
visibility: 'user-or-llm',
6666
description:
6767
'MIME type of the file (e.g., application/pdf). Applies only to the base64 upload path; a file from the File input always sends the content type resolved from storage.',
6868
},

0 commit comments

Comments
 (0)