mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-09-26 20:41:45 +00:00
fix(web): pass FileDTO array directly to packContent (files already byte-converted)
This commit is contained in:
@@ -124,19 +124,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const payload = packContent(
|
const payload = packContent(
|
||||||
isFile
|
isFile ? { type: 'files', files } : { type: 'text', text: textContent },
|
||||||
? {
|
|
||||||
type: 'files',
|
|
||||||
files: await Promise.all(
|
|
||||||
files.map(async (file) => ({
|
|
||||||
name: file.name,
|
|
||||||
mime: file.type,
|
|
||||||
size: file.size,
|
|
||||||
data: new Uint8Array(await file.arrayBuffer()),
|
|
||||||
}))
|
|
||||||
),
|
|
||||||
}
|
|
||||||
: { type: 'text', text: textContent },
|
|
||||||
customPassword || undefined
|
customPassword || undefined
|
||||||
)
|
)
|
||||||
const serverNote: ServerNote = {
|
const serverNote: ServerNote = {
|
||||||
|
|||||||
Reference in New Issue
Block a user