Skip to content
Advertisement

Upload Image using POST form data in Python-requests

I’m working with wechat APIs … here I’ve to upload an image to wechat’s server using this API http://admin.wechat.com/wiki/index.php?title=Transferring_Multimedia_Files

JavaScript

I’m not able to post data

Advertisement

Answer

From wechat api doc:

JavaScript

Translate the command above to python:

JavaScript

Doc: https://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement