I modified Dominik Picheta asynchttpserver library to try decode the post
multipart request's. I'm a newbie in Nim programming, but the result can be
seen here:
[https://github.com/mrhdias/EnigmaHTTPServer](https://github.com/mrhdias/EnigmaHTTPServer)
At this point it is possible to decode mult
Hi @dom96, I did an experiment (see
[https://github.com/mrhdias/EnigmaHTTPServer](https://github.com/mrhdias/EnigmaHTTPServer))
to decode the multipart/data request body by doing the cache of the body. I do
not know if it's the best approach, but it works and it's fast for large files.
But for
Sadly this in a bit of state of flux.
I created something called `FutureStream` which _can_ be used for this (but
needs changes in asynchttpserver: the `body` should be a `FutureStream` just
like `HttpClient`'s request object's `body` is also a `FutureStream`). The
`FutureStream` has issues tho
This code is pretty simple and is a example, but is painfully slow for big
files (10Mb)!
How to read data chunks of request body to a temp file instead of reading
everything at once to memory?
import asynchttpserver, asyncdispatch
proc handler(req: Request) {.async.} =