Files
hik-push/hik_push/test.py
quantulr 8128bfb5f9 update
2024-01-26 11:34:46 +08:00

15 lines
513 B
Python

import io
import json
import requests
if __name__ == '__main__':
image_content = requests.get(
"http://47.102.206.10:8086/api/uploads/image/20231101/5bedf085-841a-48cc-bca2-9c9b2c751b48.jpeg").content
image_bytes = io.BytesIO(image_content)
# files = {"file": image_bytes}
data = {"file": "67tgby6y67tg", "file_bytes": "fsfadfsdffadf"}
resp = requests.post("http://localhost:8000/upload",
files={"file": image_bytes}).content.decode('utf-8')
print(resp)