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
client.py
files = { 'file': ( os.path.basename('path/to/file'), open('path/to/file', 'rb'), 'application/octet-stream' ) } requests.post(url, files=files)
server.py
@app.route('/', methods=['POST']) def index(): picture = request.files.get('file') picture.save('path/to/save') return 'ok', 200