mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
fix attachment sync
This commit is contained in:
@@ -32,8 +32,8 @@ router.post('/upload/:parentNoteId', auth.checkApiAuthOrElectron, multer.single(
|
||||
mime: file.mimetype
|
||||
}, req, sourceId)).noteId;
|
||||
|
||||
await attributes.createAttribute(noteId, "original_file_name", originalName);
|
||||
await attributes.createAttribute(noteId, "file_size", size);
|
||||
await attributes.createAttribute(noteId, "original_file_name", originalName, sourceId);
|
||||
await attributes.createAttribute(noteId, "file_size", size, sourceId);
|
||||
|
||||
res.send({
|
||||
noteId: noteId
|
||||
|
||||
@@ -79,9 +79,12 @@ router.get('/changed', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
|
||||
router.get('/notes/:noteId', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
const noteId = req.params.noteId;
|
||||
const entity = await sql.getRow("SELECT * FROM notes WHERE noteId = ?", [noteId]);
|
||||
|
||||
sync.serializeNoteContentBuffer(entity);
|
||||
|
||||
res.send({
|
||||
entity: await sql.getRow("SELECT * FROM notes WHERE noteId = ?", [noteId])
|
||||
entity: entity
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user