from requests import get,post
import pandas as pd
import time
import os

teamId = 106
ip = "http://10.143.25.3:8090"
param = {
    "username": "tangchao",
    "password": "123456a",
    "client_id": "client",
    "grant_type": "password",
    "client_secret": "123456",
}
data = get(url=f"{ip}/oauth/token",params=param).json()
token = data["access_token"]
header = {
    "content-type": "application/json",
    "authorization": f"Bearer {token}",
}
for root, dirs, files in os.walk("./students/"):
    for file in files:
        formFile = open(os.path.join(root, file), "rb")
        mu_files = {
            "file": (file, formFile, "image/jpeg"),
        }
        response = post(url=f"{ip}/school/stuface/upload", headers=, files=mu_files)
        print(file)
        print(response.json())
        formFile.close()
        break
    break