Skip to content

Build your personal knowledge base with Trilium Notes

better fallback for resolving filenames of binary attachments

zadambe7ac742350e
diff --git a/src/services/utils.js b/src/services/utils.js
index 7cb02ae402..539e829991 100644
--- a/src/services/utils.js
+++ b/src/services/utils.js
@@ -205,6 +205,14 @@ function formatDownloadTitle(filename, type, mime) {
}
}
+ if (mime === 'application/octet-stream') {
+ // we didn't find any good guess for this one, it will be better to just return
+ // the current name without fake extension. It's possible that the title still preserves to correct
+ // extension too
+
+ return filename;
+ }
+
return filename + '.' + extensions[0];
}
}