defnull / multipart

A fast multipart/form-data parser for python
https://multipart.readthedocs.io/
MIT License
135 stars 33 forks source link

MultipartPart() and __str__() #2

Closed defnull closed 3 months ago

defnull commented 14 years ago

MultipartPart() instances should be usable as strings but throw an exception if they are to big to fit into memory.

wobsta commented 14 years ago

MultipartPart is not aware of a mem_limit. It sure has a memfile_limit, but that's about it. (The disk_limit and mem_limit is enforced by MultipartParser.) MultipartPart has a value function (!), not a value property (anymore -- I changed this recently).

defnull commented 3 months ago

I now think this was a bad idea. MultipartPart has a value property that returns a decoded string already. str(x) should not raise an exception or have potentially very expensive side effects. I'll just close this.