Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import argparse
- import io
- import os
- import sys
- import base64
- import requests
- def read_file_bytestream(image_path):
- data = open(image_path, 'rb').read()
- return data
- if __name__== "__main__":
- data=read_file_bytestream("testimg.png")
- requests.put("http.//0.0.0.0:8080", files={'image': data})
Add Comment
Please, Sign In to add comment