diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index 1bfbf5d1..3cabfdb4 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -107,16 +107,16 @@ const MemoEditor: React.FC = () => { const { type } = file; if (!type.startsWith("image")) { + toastHelper.error("Only image file supported."); return; } try { const image = await resourceService.upload(file); const url = `/h/r/${image.id}/${image.filename}`; - return url; } catch (error: any) { - toastHelper.error(error); + toastHelper.error("Failed to upload image\n" + JSON.stringify(error, null, 4)); } finally { setState({ ...state,