You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With reference to discussion in issue #310 and multipart/form-data it is requested that Crow adds functionality to extract named parameters in an easy and intuitive way exemplified by the multipart_params class (this code is just for reference, please feel free to use, modify or completely rewrite as needed).
The text was updated successfully, but these errors were encountered:
arnholm
changed the title
Support for extracting named parameters form multipart/form-data
Support for extracting named parameters from multipart/form-data
Jan 4, 2022
arnholm
changed the title
Support for extracting named parameters from multipart/form-data
Support for extracting named parameters from multipart/form-dataJan 4, 2022
One thing to add to this issue is that it would be useful to restructure the multipart::part struct to have a map of headers (as opposed to a vector) so they're accessible by string comparison rather than indices.
This fix sounds reasonable. I think there could be more, as I've always found the multipart api myself a bit hard/verbose to use.
One important missing feature is extracting parts by names. This has to be done manually now (by extracting the content-disposition header and searching for the name part 😵 )
Flask, for example, supports accessing data by name. Other web frameworks also do. I think we should provide at least some utility methods to make it working with multiple fields easier.
With reference to discussion in issue #310 and
multipart/form-data
it is requested that Crow adds functionality to extract named parameters in an easy and intuitive way exemplified by the multipart_params class (this code is just for reference, please feel free to use, modify or completely rewrite as needed).The text was updated successfully, but these errors were encountered: