mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
fix broken image sync
This commit is contained in:
@@ -252,12 +252,9 @@ async function getEntityRow(entityName, entityId) {
|
||||
|
||||
const entity = await sql.getRow(`SELECT * FROM ${entityName} WHERE ${primaryKey} = ?`, [entityId]);
|
||||
|
||||
if (entityName === 'notes' && entity.type === 'file') {
|
||||
if (entityName === 'notes' && (entity.type === 'file' || entity.type === 'image')) {
|
||||
entity.content = entity.content.toString("binary");
|
||||
}
|
||||
else if (entityName === 'images') {
|
||||
entity.data = entity.data.toString('base64');
|
||||
}
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user