@ -9,11 +9,15 @@ class ZipdownController < ApplicationController
#统一下载功能
def download
if User.current.logged?
begin
send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => params[:filename], :type => detect_content_type(params[:file])
rescue => e
render file: 'public/no_file_found.html'
end
else
render_403
#一个作业下所有文件打包下载,只有admin和课程老师有权限