mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
fix enex import splitting image/resource into multiple chunks, closes #3424
This commit is contained in:
parent
ffb3c044fa
commit
6c431ae5ed
2 changed files with 8 additions and 4 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -1,12 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.57.2",
|
"version": "0.57.5",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "trilium",
|
"version": "0.57.5",
|
||||||
"version": "0.57.2",
|
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -148,7 +148,10 @@ function importEnex(taskContext, file, parentNote) {
|
||||||
if (currentTag === 'data') {
|
if (currentTag === 'data') {
|
||||||
text = text.replace(/\s/g, '');
|
text = text.replace(/\s/g, '');
|
||||||
|
|
||||||
resource.content = utils.fromBase64(text);
|
// resource can be chunked into multiple events: https://github.com/zadam/trilium/issues/3424
|
||||||
|
// it would probably make sense to do this in a more global way since it can in theory affect any field,
|
||||||
|
// not just data
|
||||||
|
resource.content = (resource.content || "") + text;
|
||||||
}
|
}
|
||||||
else if (currentTag === 'mime') {
|
else if (currentTag === 'mime') {
|
||||||
resource.mime = text.toLowerCase();
|
resource.mime = text.toLowerCase();
|
||||||
|
@ -246,6 +249,8 @@ function importEnex(taskContext, file, parentNote) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource.content = utils.fromBase64(resource.content);
|
||||||
|
|
||||||
const hash = utils.md5(resource.content);
|
const hash = utils.md5(resource.content);
|
||||||
|
|
||||||
// skip all checked/unchecked checkboxes from OneNote
|
// skip all checked/unchecked checkboxes from OneNote
|
||||||
|
|
Loading…
Reference in a new issue