Код: Выделить всё
async def uploadfiles(upload_file: UploadFile = File(...):
Код: Выделить всё
m = MultipartEncoder(fields = {"upload_file":open(file_name,'rb')})
prefix = "http://xxx:5000"
url = "{}/v1/uploadfiles".format(prefix)
try:
req = requests.post(
url,
data=m,
verify=False,
)
Код: Выделить всё
HTTP 422 {"detail":[{"loc":["body","upload_file"],"msg":"field required","type":"value_error.missing"}]}
Подробнее здесь: https://stackoverflow.com/questions/734 ... pi-backend
Мобильная версия