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.
This commit is contained in:
Jonathan Rhyne
2026-01-22 08:33:13 -05:00
parent 80c1edc3ff
commit 47e440f73a

View File

@@ -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 }