上传大文件(大于服务器限制)时。我希望返回状态为500的回复
我尝试过邮递员发布API,它返回500
错误,这是我需要的
我尝试了发布API的请求
这是请求代码:
with open('invalid_big_license', 'rb') as f:
test = s.post(
url,
headers=headers,
data=None,
files={'file': ('invalid_big_license', f)},
timeout=1200
)
请求增加
requests.exceptions.ConnectionError: ('Connection aborted.', OSError(41, 'Protocol wrong type for socket'))
我需要的是状态为500
的响应返回
如果上传文件在服务器限制之内(例如1m),则请求成功