Upload file command with copy/paste logic (#571)

Upload: File command

Co-authored-by: prcrst <p-github@prcr.st>
Co-authored-by: Zef Hemel <zef@zef.me>
This commit is contained in:
prcrst
2023-11-23 12:09:48 +01:00
committed by GitHub
co-authored by prcrst Zef Hemel
parent 621c21d26c
commit ae9c8dcb4c
4 changed files with 55 additions and 0 deletions
+1
View File
@@ -88,6 +88,7 @@ export function editorSyscalls(editor: Client): SysCallMapping {
if (evt.target?.readyState == FileReader.DONE) {
resolve({
name: file.name,
contentType: file.type,
content: new Uint8Array(await file.arrayBuffer()),
});
}