【问题标题】:GitHub profile picture upload not workingGitHub个人资料图片上传不起作用
【发布时间】: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


【解决方案1】:

According to GitHub,他们的个人资料图片的最大文件大小为 1 MB,这就是为什么他们建议将其保持在 500x500 像素左右。不幸的是,他们的 UI 看起来并没有真正显示错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-01-10
    • 2014-04-14
    • 1970-01-01
    • 1970-01-01
    • 2017-09-30
    • 2015-05-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多