Added support for multipart file uploads.
Fixes and improvements.