Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update error message (#129)

boojack38383a426f83
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx
index 1bfbf5d1a..3cabfdb49 100644
--- a/web/src/components/MemoEditor.tsx
+++ b/web/src/components/MemoEditor.tsx
@@ -107,16 +107,16 @@ const MemoEditor: React.FC<Props> = () => {
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,