fix bug: upload more than 2 files in a single post request will be failed
Merge pull request #414 from realxu/master

Wrong length calculated when uploading files, Closing #332