Display contents of text files uploaded with drop zone example

Is this a sane way of accomplishing this?

It works just fine, but I sort of have no idea how it works, or if I’m leaking memory when files are uploaded or something along those lines.

Based on this comment: https://gist.github.com/rparrett/2137f02dcbc2bdc552d7ce3cdf3b68c7
And on the websocket client example: https://github.com/seed-rs/seed/blob/0.6.0/examples/websocket/src/client.rs

See https://github.com/seed-rs/seed/pull/415.
But I’m impressed that you managed to do it through callbacks and another JS API :slight_smile:

Ad websocket example - there is probably a simpler way how to write it now (even with the raw JS bindings) thanks to async/.await and new Seed API which supports subscriptions and streams. I’ll refactor it once we have proper websocket service in Seed in the future.

1 Like