How to configure MultipartParseOptions? #2019
-
I'd like to set |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I answered my own question by examining the source: from falcon.media.multipart import MultipartFormHandler, MultipartParseOptions
options = MultipartParseOptions()
options.max_body_part_count = 0
app = falcon.App()
app.req_options.media_handlers[falcon.MEDIA_MULTIPART] = MultipartFormHandler(options) It's weird you can't set options in the constructor. |
Beta Was this translation helpful? Give feedback.
-
Hi @rogerrohrbach! >>> import falcon.media
>>> handler = falcon.media.MultipartFormHandler()
>>> handler.parse_options.max_body_part_count
64
>>> handler.parse_options.max_body_part_count = 0 You're right that this is not properly documented for The only place where this is illustrated is a recipe explaining how to deal with (legacy) nested multipart forms, definitely not the most obvious place to look for. |
Beta Was this translation helpful? Give feedback.
-
I've now created an issue from this discussion too: #2020. |
Beta Was this translation helpful? Give feedback.
I answered my own question by examining the source:
It's weird you can't set options in the constructor.