# 无法上传名称中包含 ++ 的文件

**URL:** <https://meta.discourse.org/t/cannot-upload-file-with-in-name/115985>\
**Category:** Bug\
**Created:** [2019年四月25日 17:33 UTC](https://meta.discourse.org/t/cannot-upload-file-with-in-name/115985 "2019-04-25T17:33:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2019年四月25日 17:33 UTC](https://meta.discourse.org/t/cannot-upload-file-with-in-name/115985/1 "2019-04-25T17:33:50Z")

</div>

A pretty obscure bug, took me a while to find out what was going on.

Uploading a file with two consecutive plus characters in the filename (like `blah++blah.png`) fails miserably: the progress seems stuck on 0% but that turns out to be because of a Javascript error. Probably the ++ makes a regex go nuts.

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/1/71e9776e99872394897dc87b0e021d15a8e8879e.png)

---

<div class="post-metadata">

**Author:** ![venarius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/venarius/32/133142_2.png) [@venarius](https://meta.discourse.org/u/venarius)\
**Post date:** [2019年四月25日 18:11 UTC](https://meta.discourse.org/t/cannot-upload-file-with-in-name/115985/2 "2019-04-25T18:11:00Z")

</div>

Was able to repro. Will have a look 🙂

EDIT: Opened a PR

[https://github.com/discourse/discourse/pull/7442](https://github.com/discourse/discourse/pull/7442)

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年四月30日 08:00 UTC](https://meta.discourse.org/t/cannot-upload-file-with-in-name/115985/3 "2019-04-30T08:00:12Z")

</div>

This topic was automatically closed after 29 hours. New replies are no longer allowed.
