Merge pull request #206 from TriliumNext/bugfix/image_upload_regression

server: Fix regression in uploading images
This commit is contained in:
Elian Doran
2024-07-14 11:07:34 +03:00
committed by GitHub

View File

@@ -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;