From d522ca2eb24098232ac963796c7714d8544ac4c6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 16 May 2019 15:18:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/zip_service.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/zip_service.rb b/app/services/zip_service.rb index 5ee8617f..72be23fd 100755 --- a/app/services/zip_service.rb +++ b/app/services/zip_service.rb @@ -201,7 +201,10 @@ module ZipService # file_name = "#{homework.course_id}-#{homework.name}-#{student_work.user.user_extensions.student_id}-#{student_work.user.show_real_name}" + ".pdf" # file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{homework.course_id}-#{homework.id}-#{student_work.user.user_extensions.student_id}" + ".pdf" file_name.gsub!(" ", "-") + Rails.logger.info("######################before_dispos_file_name: #{file_name}") + file_name = filename_for_content_disposition(file_name) + Rails.logger.info("######################after_dispos_file_name: #{file_name}") kit.to_file("#{OUTPUT_FOLDER}/#{file_name}") out_file = "#{OUTPUT_FOLDER}/#{file_name}" out_file