httpURLConnection large file upload (setFixedLengthStreamingMode)
By default, httpURLConnection caches all output stream data, and then encapsulates it into an http. So it's easy to crash.
http://blog.csdn.net/phantomes/article/details/19606455
File upload ideas
direct output stream. ( httpURLConnection will cache all the data and send it at once, only suitable for small files )
Fixed size ( setFixedLengthStreamingMode )
large file
direct output stream. ( httpURLConnection will cache all the data, and then send it at one time, only suitable for small files ) ( file split, multiple http requests)
Fixed size ( setFixedLengthStreamingMode )