# 添加配置选项以内联显示本地PDF上传

**URL:** https://meta.discourse.org/t/add-configuration-option-to-serve-local-pdf-uploads-inline/257040
**Category:** Feature
**Tags:** completed, pdf-previews
**Created:** [2023 年3 月 4 日 08:56 UTC](https://meta.discourse.org/t/add-configuration-option-to-serve-local-pdf-uploads-inline/257040 "2023-03-04T08:56:41Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### 作者： ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### 发布日期： [2024 年7 月 4 日 00:54 UTC](https://meta.discourse.org/t/add-configuration-option-to-serve-local-pdf-uploads-inline/257040/3 "2024-07-04T00:54:50Z")

</div>

这对我来说比当前的默认行为更有意义。

当我在帖子中遇到 PDF 时，我通常想阅读它，而不是下载它。几乎所有的 PDF 查看器都允许读者（如果他们愿意）轻松下载文件。

当前的行为在 Android 上会引起一个特别的问题，即如果 PDF 已经被下载，它只会询问您是否希望再次下载。如果您说“否”，您就无法阅读它。如果您说“是”，您会在下载文件夹中添加另一个副本。两者都有些糟糕。

值得注意的是，[内联 PDF 预览主题组件](https://meta.discourse.org/t/inline-pdf-previews/157649) 几乎可以实现期望的行为，如果

1. [此错误](https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901/1) 已修复  
_并且_
2. 它也适用于移动设备在新标签页中打开

---

_[View the full topic](https://meta.discourse.org/t/add-configuration-option-to-serve-local-pdf-uploads-inline/257040)._
