# 无法上传图片和文件，提示服务协议必须是：'\_tcp' 或 '\_udp'

**URL:** <https://meta.discourse.org/t/cant-upload-images-and-files-as-it-says-the-service-protocol-must-be-tcp-or-udp/277809>\
**Category:** Support\
**Created:** [2023年九月5日 04:24 UTC](https://meta.discourse.org/t/cant-upload-images-and-files-as-it-says-the-service-protocol-must-be-tcp-or-udp/277809 "2023-09-05T04:24:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnny\_The\_OP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johnny_the_op/32/324273_2.png) [@Johnny\_The\_OP](https://meta.discourse.org/u/Johnny_The_OP)\
**Post date:** [2023年九月5日 04:24 UTC](https://meta.discourse.org/t/cant-upload-images-and-files-as-it-says-the-service-protocol-must-be-tcp-or-udp/277809/1 "2023-09-05T04:24:15Z")

</div>

你好！

我有一个运行 Discourse 的网站，在我的 Discourse 网站/服务器上，人们无法上传或发送照片，因为会出现此消息：“无效的服务协议，必须是‘\_tcp’或‘\_udp’”。

此外，作为管理员，我也无法发送或上传图片。如何修复这个问题，使其格式不必是那样的？以前上传照片之类的都没问题，但自从某个时间点开始就变成这样了。

我查看了我的设置，特别是“文件”，但我仍然不确定问题可能是什么。我能得到答复吗？

非常感谢 🙂

---

<div class="post-metadata">

**Author:** ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)\
**Post date:** [2023年九月5日 04:27 UTC](https://meta.discourse.org/t/cant-upload-images-and-files-as-it-says-the-service-protocol-must-be-tcp-or-udp/277809/2 "2023-09-05T04:27:24Z")

</div>

您是否使用 S3 来存储图片和其他上传内容？

---

<div class="post-metadata">

**Author:** ![Johnny\_The\_OP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johnny_the_op/32/324273_2.png) [@Johnny\_The\_OP](https://meta.discourse.org/u/Johnny_The_OP)\
**Post date:** [2023年九月5日 05:18 UTC](https://meta.discourse.org/t/cant-upload-images-and-files-as-it-says-the-service-protocol-must-be-tcp-or-udp/277809/3 "2023-09-05T05:18:23Z")

</div>

![Screen Shot 2023-09-05 at 1.16.54 PM](https://global.discourse-cdn.com/meta/original/4X/f/0/2/f02f82bf1ff802cb66df0f5332003757ef7c57f8.png)

这就是文件设置里面的样子，所以……我不这么认为。它需要被勾选吗？我确实看到过关于“S3”的提及，但我完全不知道那是什么意思。

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2023年九月5日 14:29 UTC](https://meta.discourse.org/t/cant-upload-images-and-files-as-it-says-the-service-protocol-must-be-tcp-or-udp/277809/4 "2023-09-05T14:29:32Z")

</div>

您尚未启用 S3，因此您没有使用它。

> [@Johnny\_The\_OP](#):
>
> 无效的服务协议

看起来您正在使用我们的 DNS-SD gem？我认为这条消息来自[那里](https://github.com/discourse/dns-sd/blob/b1e9137f2a4def7da67be63912f611e5305d2f3b/lib/dns-sd/service.rb#L51)。

您是否将其与 SRV 记录结合使用？

> [@Johnny\_The\_OP](#):
>
> 自从某个时间点开始，就变成这样了

当行为改变时，问题总是“您做了什么更改？”。您还记得吗？
