You have to set conn.setChunkedStreamingMode(-1); // use default chunk size
.
If not, HUC is buffering the whole data just to know which value to set as Content-Length
. You're actually monitoring the buffering process.
As alternative you could calculate the size of your multi-part body (good luck!) and call conn.setFixedLengthStreamingMode(lengthInBytes)
.
You find more on HttpUrlConnection multipart file upload with progressBar