From 7d320b085782eb64f4a2b26bbce78f016570e0cb Mon Sep 17 00:00:00 2001 From: xiaoxiaoqiong Date: Fri, 15 Apr 2022 11:39:04 +0800 Subject: [PATCH] =?UTF-8?q?pdf=E5=9C=A8=E7=BA=BF=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/memos_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/memos_service.rb b/app/services/memos_service.rb index a01305d2..e8816da0 100644 --- a/app/services/memos_service.rb +++ b/app/services/memos_service.rb @@ -792,7 +792,7 @@ class MemosService attachments.each do |attach| attachments_list << {:id => attach.id, :title => attach.filename, - :url => "/attachments/download/" + "#{attach.id}" + "/" + "#{attach.filename}", + :url => "/attachments/download/" + "#{attach.id}" + "/" + "#{attach.filename}#{attach.is_pdf? ? "?disposition=inline" : ""}", :filesize => number_to_human_size(attach.filesize,significant: false, precision: 2)} end end