# 无法下载 PDF

**URL:** <https://meta.discourse.org/t/unable-to-download-pdf/136957>\
**Category:** Product Support\
**Created:** [2019 年12 月 24 日 09:23 UTC](https://meta.discourse.org/t/unable-to-download-pdf/136957 "2019-12-24T09:23:58Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

作者： ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)\
发布日期： [2020 年5 月 9 日 22:45 UTC](https://meta.discourse.org/t/unable-to-download-pdf/136957/10 "2020-05-09T22:45:18Z")

</div>

> [@ashishprajapati](#):
>
> 这就是当我尝试使用下载按钮下载图片时出现的错误。（下载按钮可能使用了 **send\_data** Ruby 函数）
> 
> ![Screenshot from 2019-12-26 15-37-57](https://global.discourse-cdn.com/meta/original/3X/a/c/ac12a3f472ace2bde164cfa4ecbdab0813197b2c.png)
> 
> 我只是想确认一下，这是否是 NGINX 的问题，或者是其他目录权限相关的问题。

大家好，

抱歉回复晚了，但我通过修改 nginx.conf 文件解决了我的问题。修复非常简单，与 nginx.conf 有关（而我之前一直在尝试修复核心代码 😃）。

我从 nginx.conf 中删除了这一行：

```plaintext
 proxy_set_header X-Sendfile-Type X-Accel-Redirect;

```

这个修改让下载功能正常工作了 🙂

 ![Screenshot from 2020-05-10 04-12-53](https://global.discourse-cdn.com/meta/original/3X/4/2/427399665e2a5180e1b14a53c9158d051153581f.png)

从今往后我会更频繁地参与 🙂

谢谢，  
Ashish P.

---

_[View the full topic](https://meta.discourse.org/t/unable-to-download-pdf/136957)._
