uri module encodes uploaded file in base64 if using body_format: form-multipart even if not needed

Hi
I have just hit the issue described at uri module encodes uploaded file in base64 if using body_format: form-multipart, where the uri module encodes the uploaded file with base64, regardless the mime type of the uploaded files.

I understand the need of encoding the file in base64 when uploading binary files, but with text based mime types eg. application/xml that seems to be an unnecessary step and can break web services call that do not expect such encoding.

Would it be possible to make this behavior configurable or maybe just apply it to binary mime types?

Thanks!