HTML is not the only producer of multipart/form-data. Cleaning up encodings is very important, and citing examples from HTML5 in the RFC is illuminating and can help adoption, but please don't give readers the impression that multipart/form-data is useful only for HTML. Box.net, for example, uses it for their REST-based API and people struggle with the Google HTTP Client code library because it improperly implements multipart/form-data,. A clearer RFC that lays out the responsibility to implement might help adoption.
In XForms we also used multipart/related with an XML body for the first part, containing all instance data (what could or was bound to input etc. controls) and separate parts, referenced by URI from within the first part, for the uploaded-file components. Using JSON for the first part is a trivial change.
HTML is not the only producer of multipart/form-data. Cleaning up encodings is very important, and citing examples from HTML5 in the RFC is illuminating and can help adoption, but please don't give readers the impression that multipart/form-data is useful only for HTML. Box.net, for example, uses it for their REST-based API and people struggle with the Google HTTP Client code library because it improperly implements multipart/form-data,. A clearer RFC that lays out the responsibility to implement might help adoption.
In XForms we also used multipart/related with an XML body for the first part, containing all instance data (what could or was bound to input etc. controls) and separate parts, referenced by URI from within the first part, for the uploaded-file components. Using JSON for the first part is a trivial change.