# 非图片上传未使用 S3 CDN URL

**URL:** <https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332>\
**Category:** Bug\
**Created:** [2021 年1 月 7 日 01:24 UTC](https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332 "2021-01-07T01:24:44Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![elle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elle/32/119940_2.png) [@elle](https://meta.discourse.org/u/elle)\
发布日期： [2022 年1 月 13 日 11:46 UTC](https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332/5 "2022-01-13T11:46:51Z")

</div>

@martin 关于附件链接，我无法看到它们如何设置为始终“强制下载”。目前，在上传非图像文件时，生成的渲染 URL 是一个没有 `?dl=1` 参数的短 URL，它被解析为相应上传的 `url` 属性的值（它不是预签名 URL，并且在我们的情况下也会失败，因为 URL 不是 S3 cdn\_url，而是可能仅适用于某些 S3 提供商的构造 URL）。

是否有办法始终强制下载附件，或者当前行为实际上是一个错误？

---

_[View the full topic](https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332)._
