This commit is contained in:
2026-09-06 18:34:07 +02:00
parent 062054f450
commit e0d22283c8
14 changed files with 474 additions and 30 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import { access, constants, writeFile } from 'node:fs/promises'
import { basename, resolve } from 'node:path'
import { decode } from '@msgpack/msgpack'
import pretty from 'pretty-bytes'
import { decrypt, deriveKey, setServer, getServer, info, get } from '@cryptgeon/shared'
import { decrypt, deriveKey, setServer, getServer, info, get, decompress } from '@cryptgeon/shared'
export async function download(url: URL, all: boolean, suggestedPassword?: string) {
setServer(url.origin)
@@ -32,7 +32,7 @@ export async function download(url: URL, all: boolean, suggestedPassword?: strin
if (!note) throw new Error('Could not load note')
const decrypted = decrypt(note.data, key)
const content = decode(decrypted) as any
const content = decode(decompress(decrypted)) as any
switch (content.type) {
case 'files':