Deeper look of Multipart file upload ( RFC 1341 Specification)
Untitled Uploading large files as bytes stream from the standalone clients (like android device) using HttpURLConnection may cause memory issue or affects the performance. RFC 1341 specification gives you deeper look of how the multipart messages would work. In the case of multiple part file uploads, in which one or more different sets of data are combined in a single body, a "multipart" Content-Type field must appear in the entity’s header. you can find the utility class here. The body must then contain one or more "body parts," each preceded by an encapsulation boundary, and the last one followed by a closing boundary. Each part starts with an encapsulation boundary, and then contains a body part consisting of header area, a blank line, and a body area. Thus a body part is similar to an RFC 822 message in syntax, but different in meaning. Below is the visual representation of how the multipart data is needs to be creat