Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

master
杨树明 5 years ago
commit 112a248218

@ -213,7 +213,6 @@ class HomeworkCommonsController < ApplicationController
respond_to do |format|
format.xlsx{
cookies[:fileDownload] = true
cookies[:httponly] = false
student_work_to_xlsx(@work_excel,@homework)
exercise_export_name = "#{current_user.real_name}_#{@course.name}_#{@homework.name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
render xlsx: "#{exercise_export_name.strip}",template: "homework_commons/works_list.xlsx.axlsx",locals:
@ -237,7 +236,7 @@ class HomeworkCommonsController < ApplicationController
if status == 0
respond_to do |format|
format.zip{
cookies.signed[:fileDownload] = { value: true, httponly: false }
cookies[:fileDownload] = true
zipfile = zip_homework_common @homework, zip_works
file = decode64(zipfile[0][:base64file])
send_file "#{OUTPUT_FOLDER}/#{file}", filename: filename_for_content_disposition(file), type: 'application/zip'

@ -11,6 +11,7 @@ class ZipsController < ApplicationController
if params[:export].present? && params[:export]
normal_status(0,"正在下载中")
else
cookies[:fileDownload] = true
send_file service.zip, filename: filename_, type: 'application/zip'
end

Loading…
Cancel
Save