This commit is contained in:
quantulr
2024-01-26 11:34:46 +08:00
commit 8128bfb5f9
27 changed files with 1503 additions and 0 deletions

14
hik_push/test.py Normal file
View File

@ -0,0 +1,14 @@
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)