To quote MDN on FormData (emphasis mine):. HTTPWebrequest You will need to encode your data as multipart/form-data instead of json. Python Python multipart/form-data In the days of version 3.x of Apache Commons HttpClient, making a multipart/form-data POST request was possible (an example from 2004).Unfortunately this is no longer possible in version 4.0 of HttpClient.. For our core activity "HTTP", multipart is somewhat out of scope. The boundary parameter is automatically added to the Content-Type in the http (Hyper Text Transfer Protocol) request header. Here is an example of a multipart/form-data POST containing some name/value params and some data: So firstly, the only mistake the OP made was in not using the @ symbol before the file name. boundary We aim to provide a wide range of injection molding services and products ranging from complete molding project management customized to your needs. After executing the requests.post, the records are still there indicating that the file did not close. Furnel, Inc. has been successfully implementing this policy through honesty, integrity, and continuous improvement. multipart/form-data boundary multipart/form-data. If you use one of multipart/* content types, you are actually required to specify the boundary parameter in the Content-Type header. Introduction. Multipart form data: The ENCTYPE attribute of