mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server: Fix regression in uploading images
The attachment is first saved with no content while the image is being asynchronously resized. On our side we had a guard condition fail if the content was empty, whereas the original implementation was simply using an empty string instead.
This commit is contained in:
parent
6ecbf1c528
commit
0792714e45
@ -1644,10 +1644,7 @@ class BNote extends AbstractBeccaEntity<BNote> {
|
||||
position
|
||||
});
|
||||
|
||||
if (!content) {
|
||||
throw new Error("Attempted to save an attachment with no content.");
|
||||
}
|
||||
|
||||
content = content || "";
|
||||
attachment.setContent(content, {forceSave: true});
|
||||
|
||||
return attachment;
|
||||
|
Loading…
x
Reference in New Issue
Block a user