|
|
@ -10,9 +10,8 @@ class ZipsController < ApplicationController
|
|
|
|
service = BatchExportShixunReportService.new(@homework, @all_student_works)
|
|
|
|
service = BatchExportShixunReportService.new(@homework, @all_student_works)
|
|
|
|
|
|
|
|
|
|
|
|
filename = filename_for_content_disposition(service.filename)
|
|
|
|
filename = filename_for_content_disposition(service.filename)
|
|
|
|
Rails.logger.info("################___________file_name________________###########{filename}")
|
|
|
|
|
|
|
|
Rails.logger.info("################___________service.filename________________###########{service.filename}")
|
|
|
|
send_file service.zip, filename: filename, type: 'application/zip'
|
|
|
|
send_file service.zip, filename: filename.encode(Encoding.default_external, 'gb2312'), type: 'application/zip'
|
|
|
|
|
|
|
|
rescue BatchExportShixunReportService::Error => ex
|
|
|
|
rescue BatchExportShixunReportService::Error => ex
|
|
|
|
normal_status(-1, ex.message)
|
|
|
|
normal_status(-1, ex.message)
|
|
|
|
end
|
|
|
|
end
|
|
|
|