uploading new file revisions

This commit is contained in:
zadam
2019-11-09 11:58:52 +01:00
parent 7c7beb5502
commit 60ac1a04f4
11 changed files with 132 additions and 60 deletions

View File

@@ -77,6 +77,19 @@ $list.on('change', async () => {
.attr("src", `data:${note.mime};base64,` + fullNoteRevision.content)
.css("width", "100%"));
}
else if (note.type === 'file') {
$content.html(
$("<table cellpadding='10'>")
.append($("<tr>").append(
$("<th>").text("MIME: "),
$("<td>").text(revisionItem.mime)
))
.append($("<tr>").append(
$("<th>").text("File size:"),
$("<td>").text(revisionItem.contentLength + " bytes")
))
);
}
else {
$content.text("Preview isn't available for this note type.");
}