# 我该如何更改文件的URL？

**URL:** <https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758>\
**Category:** Support\
**Created:** [2025年三月25日 12:47 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758 "2025-03-25T12:47:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toxic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toxic/32/486012_2.png) [@Toxic](https://meta.discourse.org/u/Toxic)\
**Post date:** [2025年三月25日 12:47 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/1 "2025-03-25T12:47:24Z")

</div>

最近，我所在的论坛发生了一张图片的删除，但我仍然保留着文件。我正试图上传它们，但它不起作用，因为它上传的是同一个 URL，渲染后显示为已删除。那么我该如何更改它？

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2025年三月25日 23:23 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/3 "2025-03-25T23:23:30Z")

</div>

它们是如何被删除的？你能说说不是关于发生了什么以及你试图做什么的吗？

是的，文件以内容的哈希命名。通常这使得通过上传到新主题来替换缺失的上传成为可能。

---

<div class="post-metadata">

**Author:** ![Toxic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toxic/32/486012_2.png) [@Toxic](https://meta.discourse.org/u/Toxic)\
**Post date:** [2025年三月26日 00:10 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/4 "2025-03-26T00:10:34Z")

</div>

它们在一次图片清理中被删除了，因为论坛里有太多旧的、无用的图片，需要腾出空间。  
我正试图更改我正在上传到论坛的文件 URL，但我无法更改，所以图片显示为已删除且无法访问。

---

<div class="post-metadata">

**Author:** ![Toxic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toxic/32/486012_2.png) [@Toxic](https://meta.discourse.org/u/Toxic)\
**Post date:** [2025年三月26日 13:47 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/5 "2025-03-26T13:47:56Z")

</div>

算了，我找到了解决方案。

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [2025年三月26日 14:36 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/6 "2025-03-26T14:36:06Z")

</div>

你想告诉我你的解决方案是什么吗？

---

<div class="post-metadata">

**Author:** ![Toxic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toxic/32/486012_2.png) [@Toxic](https://meta.discourse.org/u/Toxic)\
**Post date:** [2025年三月26日 17:57 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/7 "2025-03-26T17:57:43Z")

</div>

所以，我拿到了文件，然后我截了个文件的屏幕截图。

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2025年四月25日 17:57 UTC](https://meta.discourse.org/t/how-do-i-change-the-url-of-a-file/358758/8 "2025-04-25T17:57:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
