0

How to use httplib to post a file as binary? Can I not use other module? It failed for me. Please see the Image.

enter image description here

In PHP has Print_r($_Files) so that I can see the reason.

Thanks

vien vu
  • 4,277
  • 2
  • 17
  • 30
aaron
  • 1
  • 2
  • 3
    Please post the code that caused this error, also please dont post code or errors as images. You should paste the actual text into the question. As for using `httplib`, it will be possible, but there are higher level libraries that will make it easier, see [requests](http://docs.python-requests.org/en/latest/) module docs. – Paul Rooney Jan 05 '16 at 03:14
  • @PaulRooney thank you for your suggestion. – aaron Jan 05 '16 at 03:23
  • Possible duplicate of [Upload a file with python using httplib](http://stackoverflow.com/questions/3079562/upload-a-file-with-python-using-httplib) – Paul Rooney Jan 05 '16 at 03:33
  • You can even try `requests` - http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file – zedfoxus Jan 05 '16 at 03:49
  • related: [Using MultipartPostHandler to POST form-data with Python](http://stackoverflow.com/q/680305/4279) – jfs Jan 05 '16 at 06:21

0 Answers0