Forms without explicit enctype are submitted as application/x-www-form-
urlencoded. This is the default behaviour in Rails. However, this
enctype does not allow transmission of binary data (files).
Would it not make sense to specify the enctype multipart/form-data by
default instead? i.e. all the form_for helpers would add this enctype
to the form tag, unless overriden by the developer.
This way, file uploads "just work" and normal key/value pairs continue
to work as well. There is no downside. I browsed through lighthouse
and only found obscure NN4 bugs related to multipart/form-data, which
I believe we can safely ignore. Even IE4 supports this enctype.
I can fork and make this change, but would like to float this idea