Reading multipart request results in Unexpected EOF error

Go version: 1.6.3 macos I am trying to write an api to upload an apk file (several MB in most cases) to the server. Here is the client side code: func syncApk(apkFile *os.File) { defer apkFile.