Fixes to file upload support