httpx
httpx copied to clipboard
Save large request bodies to temporary directory
To be able to handle large uploads, it would be helpful to have a setting such that sets the limit of a request body to a certain Content-Length (lets say 8MB). Any Content-Length above 8MB will be streamed to disk rather than parsed in memory.
I don't think there are any implementations of this for any of the Nim projects yet. But you can see how it's done with Python. See Werkzeug: https://github.com/pallets/werkzeug/blob/ef545f0d0bf28cbad02066b4cb7471bea50a93ee/src/werkzeug/formparser.py#L59