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:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user