mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
added some logging
This commit is contained in:
parent
1175a8ee49
commit
6c188982b3
@ -13,7 +13,7 @@ const TPL = `
|
|||||||
.note-detail-readonly-text h6 { font-size: 1.1em; }
|
.note-detail-readonly-text h6 { font-size: 1.1em; }
|
||||||
|
|
||||||
.note-detail-readonly-text {
|
.note-detail-readonly-text {
|
||||||
overflow: auto;y
|
overflow: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-family: var(--detail-text-font-family);
|
font-family: var(--detail-text-font-family);
|
||||||
|
@ -67,6 +67,8 @@ async function addClipping(req) {
|
|||||||
async function createNote(req) {
|
async function createNote(req) {
|
||||||
const {title, content, pageUrl, images, clipType} = req.body;
|
const {title, content, pageUrl, images, clipType} = req.body;
|
||||||
|
|
||||||
|
log.info(`Creating clipped note from ${pageUrl}`);
|
||||||
|
|
||||||
const clipperInbox = await getClipperInboxNote();
|
const clipperInbox = await getClipperInboxNote();
|
||||||
|
|
||||||
const {note} = await noteService.createNewNote({
|
const {note} = await noteService.createNewNote({
|
||||||
|
@ -51,6 +51,8 @@ function getImageMimeFromExtension(ext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function updateImage(noteId, uploadBuffer, originalName) {
|
async function updateImage(noteId, uploadBuffer, originalName) {
|
||||||
|
log.info(`Updating image ${noteId}: ${originalName}`);
|
||||||
|
|
||||||
const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, true);
|
const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, true);
|
||||||
|
|
||||||
const note = await repository.getNote(noteId);
|
const note = await repository.getNote(noteId);
|
||||||
@ -67,6 +69,8 @@ async function updateImage(noteId, uploadBuffer, originalName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function saveImage(parentNoteId, uploadBuffer, originalName, shrinkImageSwitch) {
|
async function saveImage(parentNoteId, uploadBuffer, originalName, shrinkImageSwitch) {
|
||||||
|
log.info(`Saving image ${originalName}`);
|
||||||
|
|
||||||
const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, shrinkImageSwitch);
|
const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, shrinkImageSwitch);
|
||||||
|
|
||||||
const fileName = sanitizeFilename(originalName);
|
const fileName = sanitizeFilename(originalName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user