add file transfer - #3
Conversation
| </button> | ||
| {#each launcherApps as app (app.id)} | ||
| {#if app.isInstalled() && !app.isRunning()} | ||
| <DropFile onDrop={onDrop}> |
There was a problem hiding this comment.
can we use a window-level event listener (<svelte:window>) instead so that we don't add a layer of indentation to everything and don't need another dep
There was a problem hiding this comment.
Doesn't this run in another window, so <svelte:window> targets the wrong window?
There was a problem hiding this comment.
very good point. can add listeners in app.ts then
There was a problem hiding this comment.
I ended up vendoring svelte-parts's DropFile, is that okay?
gkgoat1
left a comment
There was a problem hiding this comment.
For me to look at once back on my Mac
| const transferFiles: Record<string,string> = {}; | ||
| let script = ''; | ||
| for(const file of files){ | ||
| transferFiles[file.name + '._'] = btoa(String.fromCharCode(...new Uint8Array(await file.arrayBuffer()))); |
There was a problem hiding this comment.
We could probably use Uint8Array.toBase64 if supported
| </button> | ||
| {#each launcherApps as app (app.id)} | ||
| {#if app.isInstalled() && !app.isRunning()} | ||
| <DropFile onDrop={onDrop}> |
|
nuances:
|
Maybe you (or an agent) could port https://github.com/n0-computer/iroh to the web (Pulsar is meant for proxying, but iroh is perfect for p2p) ;L
Still, exposing a server from the cod VM would be effective to get large amounts of information in and out quickly |
Adds file transfer to the Cod VM