# 当取消 S3 时，图片链接或文件链接应自动显示本地路径

**URL:** https://meta.discourse.org/t/when-s3-is-canceled-image-links-or-file-links-should-automatically-show-the-local-path/312291
**Category:** Self-hosting
**Tags:** uploads, s3
**Created:** [2024年六月16日 18:52 UTC](https://meta.discourse.org/t/when-s3-is-canceled-image-links-or-file-links-should-automatically-show-the-local-path/312291 "2024-06-16T18:52:36Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![kuaza](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuaza/32/264151_2.png) [@kuaza](https://meta.discourse.org/u/kuaza)
#### Post date: [2024年六月20日 16:04 UTC](https://meta.discourse.org/t/when-s3-is-canceled-image-links-or-file-links-should-automatically-show-the-local-path/312291/3 "2024-06-20T16:04:35Z")

</div>

我不想让你太累，但你能在这里写下如何做到这一点吗？因为当我做不到的时候，我尝试了所有我能找到的方法，结果让网站变得更糟。🙏 🙏

啊，我想这就是你说的。我会试试这个，谢谢：

> [@Migrating uploads from S3 to local](https://meta.discourse.org/t/migrating-uploads-from-s3-to-local/163903/31?u=kuaza):
>
> Getting the files to your server is just (the easy) part of the problem. You can look at the uploads with cd /var/discourse ./launcher enter app rails c Upload.pluck(:url) That’ll show you the URLs of your uploads. Then you need to modify all of those uploads so that they have the new path to your new bucket. You can try searching for the remap command. I think it might work I’m not sure what this means.

---

_[View the full topic](https://meta.discourse.org/t/when-s3-is-canceled-image-links-or-file-links-should-automatically-show-the-local-path/312291)._
