We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c01d51 commit 7e8683aCopy full SHA for 7e8683a
1 file changed
packages/slack/src/message.ts
@@ -631,7 +631,14 @@ export const extractMessagesMetadata = async <
631
const text = await response.text();
632
throw new Error(text);
633
}
634
- if (response.headers.get("content-type") !== file.mimetype) {
+ const responseContentType = response.headers
635
+ .get("content-type")
636
+ ?.split(";")[0]
637
+ ?.trim();
638
+ if (
639
+ !responseContentType ||
640
+ !supportedFileTypes.includes(responseContentType)
641
+ ) {
642
throw new Error(
643
`The file ${file.name} mime type returned by the server was ${response.headers.get("content-type")}.`
644
);
0 commit comments