Merge branch 'guange_dev' into 'develop'

变量统一



See merge request !111
This commit is contained in:
黄井泉 2017-01-06 15:00:21 +08:00
commit 6b67f5036c
3 changed files with 7 additions and 12 deletions

View File

@ -5,12 +5,11 @@ class ZipdownController < ApplicationController
before_filter :find_project_by_bid_id, :only => [:assort]
#检查权限
#勿删 before_filter :authorize, :only => [:assort,:download_user_homework]
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
MAX_PATH = 50
## 200M
MAX_DOWN_SIZE = 200 * 1024 * 1024
include ZipService
#统一下载功能
def download
if User.current.logged?
@ -114,6 +113,4 @@ class ZipdownController < ApplicationController
end
end
include ZipService
end

View File

@ -1,10 +1,12 @@
require "base64"
require 'zip'
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
MAX_PATH = 50
module ZipService
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
MAX_PATH = 50
def zip_bid(bid)
# Todo: User Access Controll
bid_homework_path = []

View File

@ -1,9 +1,5 @@
#coding=utf-8
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
MAX_PATH = 50
namespace :zip do
desc "手工打包作品"
task :pack => :environment do