mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 19:51:57 +08:00
better fallback for resolving filenames of binary attachments
This commit is contained in:
parent
58fa0832f6
commit
be7ac74235
1 changed files with 8 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue