# 上传图片到用户资料失败，原因是 JS 错误

**URL:** <https://meta.discourse.org/t/uploading-images-to-user-profile-failing-due-to-js-error/323331>\
**Category:** Bug\
**Tags:** uploads, fixed\
**Created:** [2024年八月26日 00:34 UTC](https://meta.discourse.org/t/uploading-images-to-user-profile-failing-due-to-js-error/323331 "2024-08-26T00:34:37Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)\
**Post date:** [2024年八月26日 00:34 UTC](https://meta.discourse.org/t/uploading-images-to-user-profile-failing-due-to-js-error/323331/1 "2024-08-26T00:34:37Z")

</div>

我不确定这是否相关，但错误似乎与此非常相似：[Uploading of video file fails due to JS error](https://meta.discourse.org/t/uploading-of-video-file-fails-due-to-js-error/322363)

当我

1. 转到 /my/preferences/account
2. 编辑个人资料图片
3. 添加自定义图片

我得到这个：

 ![Screenshot of failed Profile Picture upload](https://global.discourse-cdn.com/meta/original/4X/7/8/e/78ea2a5d3a31d1a5566258bdd89081115c532261.png)

 ![The image is a screenshot of a computer error message. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/a/4/f/a4f581aabfa4f1b362753847584f0105185b5d64.png)

无论文件是已上传还是未上传，都会发生这种情况。帖子中的上传工作正常。我周末进行了更新。安全模式下也是如此。

我可以在全新安装中重现此问题，但在 [meta.discourse.org](http://meta.discourse.org)（或 Stable）上不行。

---

_[View the full topic](https://meta.discourse.org/t/uploading-images-to-user-profile-failing-due-to-js-error/323331)._
