Uploading Files (Multipart MIME)
Multipart MIME is a standard used for uploading files to webservers. All the API resources which support file uploads in ET use this standard.
Uploads look like this:
Typically – a library will generate this for you – but if you are generating it yourself then the key points are as follows:
- Content type set to “multipart/mixed”.
- A “boundary=[something unique]”
- The boundary starts and ends the body of the POST. (with — at the start and –[boundary]– at the end)
- There must be a blank line between the headers for the part and the part content. (in the example – between Content-Length: 3 and ABC)