In my rails API, I have added an initialiser that will change the keys of the JSON input from snake-case to underscore-separated. Like so:
ActionDispatch::Reques
When you look at the DEFAULT_PARSERS, it uses the Mime class, so whatever we end up using will likely need to be recognizable by the Mime class. So we can check Mime::Types to see what's available.
On that page, we see that content-type: multipart/form-data is mapped to :multipart_form. Indeed, while using
ActionDispatch::Request.parameter_parsers[:multipart_form] = -> (raw_post) {
raise "Parsing Parameters: #{raw_post}"
}
and then submitting a form with a file field, I can trigger the error.