class HttpHandler(BaseHTTPRequestHandler):

    def do_POST(self):
        content_length = int(self.headers['Content-Length'])
file_content = self.rfile.read(content_length)
print(file_content)
Get file from POST request using Python's BaseHTTPServer