From 47e440f73a4920e2687e019e8fcaf3f464628848 Mon Sep 17 00:00:00 2001 From: Jonathan Rhyne Date: Thu, 22 Jan 2026 08:33:13 -0500 Subject: [PATCH] fix(slack): remove deprecated filetype field from files.uploadV2 Slack's files.uploadV2 API no longer supports the filetype field and logs deprecation warnings when it's included. Slack auto-detects the file type from the file content, so this field is unnecessary. This removes the warning: [WARN] web-api:WebClient filetype is no longer a supported field in files.uploadV2. --- src/slack/send.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slack/send.ts b/src/slack/send.ts index 1f867e9ac..cfc6c4707 100644 --- a/src/slack/send.ts +++ b/src/slack/send.ts @@ -94,7 +94,7 @@ async function uploadSlackFile(params: { file: buffer, filename: fileName, ...(params.caption ? { initial_comment: params.caption } : {}), - ...(contentType ? { filetype: contentType } : {}), + // Note: filetype is deprecated in files.uploadV2, Slack auto-detects from file content }; const payload: FilesUploadV2Arguments = params.threadTs ? { ...basePayload, thread_ts: params.threadTs }