zip first

This commit is contained in:
Jesse-Ma
2023-03-23 11:34:41 +08:00
parent b31563aaab
commit b017e7bda1
3 changed files with 54 additions and 54 deletions

View File

@@ -48,8 +48,12 @@ export function saveNote(noteForm, secret) {
});
}
let bufferArrary = eval("[" + note.text + "]");
let array = Uint8Array.from(bufferArrary);
// let bufferArrary = eval("[" + note.text + "]");
// let array = Uint8Array.from(bufferArrary);
let encoder = new TextEncoder()
let array = encoder.encode(note.text)
let blob = new Blob([array], { type: "application/octet-stream" });
let form = new FormData();
form.append("file", blob, noteForm.key);