httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Save large request bodies to temporary directory

Open jivank opened this issue 3 years ago • 5 comments

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

jivank avatar Aug 11 '20 00:08 jivank