【发布时间】:2019-08-31 01:36:11
【问题描述】:
这是我尝试在 GitHub 上上传约 1MB 图片作为个人资料图片时得到的响应:
POST https://github.com/upload/policies/avatars 422 (Unprocessable Entity)
errors: [{resource: "Avatar", code: "custom", field: "size", message: "size is not included in the list"}]
0: {resource: "Avatar", code: "custom", field: "size", message: "size is not included in the list"}
code: "custom"
field: "size"
message: "size is not included in the list"
resource: "Avatar"
我从控制台和 Chrome DevTools 网络选项卡中获取了这个,因为前端绝对没有任何反馈。这里可能是什么问题?我禁用了所有扩展并尝试了 Firefox,但问题仍然存在。
【问题讨论】:
-
这里出现同样的错误。您是否也尝试过不同的格式、尺寸等?
-
我最终尝试了一张非常小的图片,它成功了
-
确认这对我也有效。显然是the image has to be under 1MB,虽然浏览器没有错误(除了检查网络流量)来说明错误发生的原因。
-
@LewlSauce 你想把它放到答案中以便我接受吗?
标签: google-chrome firefox github google-chrome-devtools