fix: fallback mime type for drag-n-drop attachments

This commit is contained in:
Dmytro Manchynskyi 2025-09-19 13:50:41 +03:00 committed by GitHub
parent 7ab57f8ed2
commit 0c1f462233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import copy from "copy-to-clipboard";
import { isEqual } from "lodash-es";
import { LoaderIcon } from "lucide-react";
import mime from "mime";
import { observer } from "mobx-react-lite";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { toast } from "react-hot-toast";
@ -214,7 +215,7 @@ const MemoEditor = observer((props: Props) => {
attachment: Attachment.fromPartial({
filename,
size,
type,
type || mime.getType(filename) || "text/plain",
content: buffer,
}),
attachmentId: "",