multipart data POST using python requests: no multipart boundary was found

Taking out the Content-Type header with explicit "multipart/form-data" worked!


You should NEVER set that header yourself. We set the header properly with the boundary. If you set that header, we won't and your server won't know what boundary to expect (since it is added to the header). Remove your custom Content-Type header and you'll be fine.


To specifically add boundary add following in header :

headers = {
    'content-type': 'multipart/form-data; boundary=ebf9f03029db4c2799ae16b5428b06bd'
}