try setting the filename to actual name to see if this helps the bad request problem on file upload