Skip to content

Build your personal knowledge base with Trilium Notes

limit data base filename in ZIP export to 30 characters

zadam16563eaba4cd
diff --git a/src/services/export/zip.js b/src/services/export/zip.js
index 8d98c58255..a0c88b6944 100644
--- a/src/services/export/zip.js
+++ b/src/services/export/zip.js
@@ -73,6 +73,10 @@ function exportToZip(taskContext, branch, format, res) {
let fileName = baseFileName;
+ if (fileName.length > 30) {
+ fileName = fileName.substr(0, 30);
+ }
+
// if the note is already named with extension (e.g. "jquery.js"), then it's silly to append exact same extension again
if (newExtension && existingExtension !== "." + newExtension.toLowerCase()) {
fileName += "." + newExtension;