作品附件打包下载超过200M,给出提示

This commit is contained in:
huang 2017-01-06 14:22:14 +08:00
parent a2bc649a56
commit e0252a114a
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,8 @@
require "base64"
require 'zip'
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
MAX_PATH = 50
module ZipService
def zip_bid(bid)

View File

@ -942,6 +942,14 @@ $(function(){
$('a.tb_all').bind('ajax:complete', function (event, data, status, xhr) {
if(status == 'success'){
var res = JSON.parse(data.responseText);
if(res.err == -1){
var htmlvalue = '<div id="muban_popup_box" style="width:340px;"><div class="muban_popup_top"><h3 class="fl">温馨提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15 mr5 ml5"><p class="text_c f14">您下载的附件资源比较大请联系Trustie系统管理员</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue,380,166);
return;
}
if(res.length<1){
return;
}