fixed 风雷协议配置

This commit is contained in:
xxq250 2023-09-13 16:14:11 +08:00
parent 3ff361ebb9
commit 72469f9104
2 changed files with 6 additions and 2 deletions

View File

@ -14,8 +14,12 @@ class ApplySignaturesController < ApplicationController
def template_file
license = License.find_by_name("PHengLEI")
file = license.attachments.take
normal_status(-1, "文件不存在") if file.blank?
send_file(absolute_path(local_path(file)), filename: file.title,stream:false, type: file.content_type.presence || 'application/octet-stream')
# normal_status(-1, "文件不存在") if file.blank?
if file.blank?
send_file("#{Rails.root.to_s}/public/PHengLEI-License.docx", filename: "PHengLEI软件开源协议.docx",stream:false, type: 'application/octet-stream')
else
send_file(absolute_path(local_path(file)), filename: file.title,stream:false, type: file.content_type.presence || 'application/octet-stream')
end
end
def create

Binary file not shown.