added progress also to export

This commit is contained in:
zadam
2019-02-10 22:30:55 +01:00
parent a097cefba7
commit 6be8a3f343
14 changed files with 147 additions and 35 deletions

View File

@@ -5,7 +5,7 @@ const mimeTypes = require('mime-types');
const html = require('html');
const utils = require('../utils');
async function exportSingleNote(branch, format, res) {
async function exportSingleNote(exportContext, branch, format, res) {
const note = await branch.getNote();
if (note.type === 'image' || note.type === 'file') {
@@ -54,6 +54,9 @@ async function exportSingleNote(branch, format, res) {
res.setHeader('Content-Type', mime + '; charset=UTF-8');
res.send(payload);
exportContext.increaseProgressCount();
exportContext.exportFinished();
}
module.exports = {