mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix broken file download
This commit is contained in:
parent
cdb17ae937
commit
69677b15fe
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.30.6",
|
"version": "0.30.7",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -34,6 +34,9 @@ async function show() {
|
|||||||
else {
|
else {
|
||||||
$previewRow.hide();
|
$previewRow.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open doesn't work for protected notes since it works through browser which isn't in protected session
|
||||||
|
$openButton.toggle(!currentNote.isProtected);
|
||||||
}
|
}
|
||||||
|
|
||||||
$downloadButton.click(() => utils.download(getFileUrl()));
|
$downloadButton.click(() => utils.download(getFileUrl()));
|
||||||
@ -51,7 +54,7 @@ $openButton.click(() => {
|
|||||||
|
|
||||||
function getFileUrl() {
|
function getFileUrl() {
|
||||||
// electron needs absolute URL so we extract current host, port, protocol
|
// electron needs absolute URL so we extract current host, port, protocol
|
||||||
return utils.getHost() + "/api/notes/" + noteDetailService.getCurrentNoteId();
|
return utils.getHost() + "/api/notes/" + noteDetailService.getCurrentNoteId() + "/download";
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user