Geni_developer
Binary Form Data Structure

Binary form data must be POSTed as multipart/form-data in accordance with the RFC 7578 specification.

In addition to the binary data, the part must include text headers for both Content-Disposition and Content-Type. The Content-Disposition header must specify form-data; as well as a name parameter corresponding to the name of the form field (typically "file"). It may also optionally include a filename parameter to name the uploaded file. The Content-Type header must specify the MIME type of the binary data being uploaded.

Example of multipart/form-data for a JPG photo upload:

--------------------------27208d29c2d59d4c
Content-Disposition: form-data; name="file"; filename="family_photo.jpg"
Content-Type: image/jpeg

<binary JPG data>
--------------------------27208d29c2d59d4c

rails-1a-012