How to upload a binary/video file using Python http.client PUT method?
问题 I am communicating with an API using HTTP.client in Python 3.6.2. In order to upload a file it requires a three stage process. I have managed to talk successfully using POST methods and the server returns data as I expect. However, the stage that requires the actual file to be uploaded is a PUT method - and I cannot figure out how to syntax the code to include a pointer to the actual file on my storage - the file is an mp4 video file. Here is a snippet of the code with my noob annotations :)