added support to properly handle file upload POST