Upload robustness
This commit is contained in:
@@ -37,7 +37,7 @@ async function saveFile(file: UploadFile) {
|
||||
file.content,
|
||||
);
|
||||
let attachmentMarkdown = `[${finalFileName}](${encodeURI(finalFileName)})`;
|
||||
if (file.contentType.startsWith("image/")) {
|
||||
if (file.contentType?.startsWith("image/")) {
|
||||
attachmentMarkdown = `})`;
|
||||
}
|
||||
editor.insertAtCursor(attachmentMarkdown);
|
||||
|
||||
Reference in New Issue
Block a user