Access denied, Please sign in and make sure you have proper permission.
可以是使用 sendfile 或者 senddata 构造下载的流,在服务器上还可以配合 nginx 进行加速。
@zhurongwell 不会啊,我用 chrome 是直接下载啊。
send_file 'path/to/file.pdf'
@zhurongwell 你是把 disposition 设成 'inline'了吧。
:disposition - specifies whether the file will be shown inline or downloaded. Valid values are 'inline' and 'attachment' (default).