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
commit f40257b591
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;