diff --git a/README.md b/README.md index 7aec50f..90c9dda 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ _注:kift的解压即用版就叫做kiftd_ ------------------- 最新讯息: +### 关于打包下载功能的细节调整 ++ 在打包下载时,ZIP的压缩时间比较长,这回导致用户误以为系统崩溃。现在为压缩过程增加了提示信息。另外,本应用内置的ZIP压缩方式在压缩100MB以上的文件时所用时间会明显变长。原本计划打包下载就是为了给碎片化文件一次性下载准备的,并未考虑到压缩大文件,因此效率不高。在本人找到更好的压缩算法并更新前,请不要对太大的文件进行打包下载(虽然不会崩溃,但压缩时间会很长)。 + ### 关于windows下安装方法的修正: + 本人在Windows虚拟机上进行了模拟安装测试,并发现了之前很多用户反馈闪退问题的根本原因:安装java不会在系统中自动增加JRE_HOME环境变量。这导致kiftd根本无法找到java运行环境,出现闪退。目前本人已经紧急更新了windows下的安装流程并详细说明,为您带来的不便深感歉意!详见《说明文档》。 diff --git a/webapps/ROOT/.DS_Store b/webapps/ROOT/.DS_Store index fd49125..5008ddf 100644 Binary files a/webapps/ROOT/.DS_Store and b/webapps/ROOT/.DS_Store differ diff --git a/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.properties b/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.properties index 603bbac..399f497 100644 --- a/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.properties +++ b/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Fri Mar 23 08:34:28 CST 2018 +#Thu Mar 29 14:06:37 CST 2018 version=0.0.1-SNAPSHOT groupId=kohgylw m2e.projectName=KohgylwIFT diff --git a/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.xml b/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.xml index 720d11a..8618354 100644 --- a/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.xml +++ b/webapps/ROOT/META-INF/maven/kohgylw/KohgylwIFT/pom.xml @@ -79,7 +79,16 @@ 2.4 - + + + + + net.jpountz.lz4 + lz4 + 1.3.0 + + + KohgylwIFT diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/controller/HomeController.class b/webapps/ROOT/WEB-INF/classes/kohgylw/controller/HomeController.class index 4037c9f..5cd8d14 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/controller/HomeController.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/controller/HomeController.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/listener/SCListener.class b/webapps/ROOT/WEB-INF/classes/kohgylw/listener/SCListener.class index 84fdb83..9f975db 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/listener/SCListener.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/listener/SCListener.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/service/FileService.class b/webapps/ROOT/WEB-INF/classes/kohgylw/service/FileService.class index 5b1c39d..18239d2 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/service/FileService.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/service/FileService.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$1.class b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$1.class index 7ccdb51..ff4daf5 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$1.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$1.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$2.class b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$2.class index f3f87ce..b9ceeea 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$2.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$2.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$3.class b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$3.class index a33a1d6..ed42af5 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$3.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl$3.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl.class b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl.class index 9025e25..0069881 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/service/impl/FileServiceImpl.class differ diff --git a/webapps/ROOT/WEB-INF/classes/kohgylw/util/FileBlockUtil.class b/webapps/ROOT/WEB-INF/classes/kohgylw/util/FileBlockUtil.class index cb1b26c..de15c60 100644 Binary files a/webapps/ROOT/WEB-INF/classes/kohgylw/util/FileBlockUtil.class and b/webapps/ROOT/WEB-INF/classes/kohgylw/util/FileBlockUtil.class differ diff --git a/webapps/ROOT/WEB-INF/lib/lz4-1.3.0.jar b/webapps/ROOT/WEB-INF/lib/lz4-1.3.0.jar new file mode 100644 index 0000000..aaf641c Binary files /dev/null and b/webapps/ROOT/WEB-INF/lib/lz4-1.3.0.jar differ diff --git a/webapps/ROOT/etc/configure.properties b/webapps/ROOT/etc/configure.properties index 9b01e28..eda4415 100644 --- a/webapps/ROOT/etc/configure.properties +++ b/webapps/ROOT/etc/configure.properties @@ -32,7 +32,7 @@ authOverall = l #[Login and browse home page] #This setting means visitor could browse file list if not login #If you want any visitor must log in to entry the home page,you can set this value is N -#(N = oN;O = off) +#(N = no;O = off) #Example: #mustLogin = N mustLogin = O diff --git a/webapps/ROOT/home.jsp b/webapps/ROOT/home.jsp index 516aa4b..ee5f436 100644 --- a/webapps/ROOT/home.jsp +++ b/webapps/ROOT/home.jsp @@ -249,7 +249,9 @@ <%-- end 修改文件夹模态框 --%> + <%-- 打包下载模态框 --%> + + <%-- end 打包下载模态框 --%> - + \ No newline at end of file diff --git a/webapps/ROOT/js/home.js b/webapps/ROOT/js/home.js index 7310813..81de597 100644 --- a/webapps/ROOT/js/home.js +++ b/webapps/ROOT/js/home.js @@ -938,47 +938,79 @@ function checkallfile() { } } +// 显示打包下载模态框 function showDownloadAllCheckedModel() { - $("#downloadFileBox").html(""); + $("#downloadAllCheckedBox").html(""); + $("#downloadAllCheckedLoad").text(""); var checkedfiles = $(".info").get(); if (checkedfiles.length == 0) { - $("#downloadFileName") + $("#downloadAllCheckedName") .text( "提示:您还未选择任何文件,请先选中一些文件后再执行本操作(您可以通过点击某一文件行来选中/取消选中文件,也可以通过点击列表上的“文件名”一栏来选中/取消选中所有文件)"); } else { - $("#downloadFileName").text( + $("#downloadAllCheckedName").text( "提示:您确认要打包并下载这" + checkedfiles.length + "项么?"); - $("#downloadFileBox") + $("#downloadAllCheckedBox") .html( - ""); - $("#dlmbutton").attr('disabled', false); + ""); + $("#dclmbutton").attr('disabled', false); } - $("#downloadModal").modal('toggle'); + $("#downloadAllCheckedModal").modal('toggle'); } // 下载选中的所有文件 function downloadAllChecked() { + $("#dclmbutton").attr('disabled', true); var checkedfiles = $(".info").get(); var downloadIdArray = new Array(); for (var i = 0; i < checkedfiles.length; i++) { downloadIdArray[i] = checkedfiles[i].id; } var strIdList = JSON.stringify(downloadIdArray); - $("#dlmbutton").attr('disabled', true); - $("#downloadFileName").text( - "提示:准备开始下载(共" + checkedfiles.length + "项),请稍候..."); - var t = setTimeout("$('#downloadModal').modal('hide');", 1000); - // POST提交全部下载请求 - var temp = document.createElement("form"); - temp.action = 'homeController/downloadCheckedFiles.do'; - temp.method = "post"; - temp.style.display = "none"; - var sl = document.createElement("input"); - sl.name = 'strIdList'; - sl.value = strIdList; - temp.appendChild(sl); - document.body.appendChild(temp); - temp.submit(); + $("#downloadAllCheckedName").text( + "提示:正在进行压缩(共" + checkedfiles.length + "项),这可能需要一些时间(文件越大时间越长)。压缩完成后自动开始下载"); + var count = 0; + var c = new Array(".", "..", "...",""); + setInterval(function() { + if(count > c.length) { + count = 0; + } + $("#downloadAllCheckedLoad").text(c[count]); + count++; + }, 500); + $.ajax({ + type : "POST", + url : "homeController/downloadCheckedFiles.ajax", + data : { + strIdList : strIdList + }, + dataType : "text", + success : function(result) { + if (result == "ERROR") { + $("#downloadAllCheckedName") + .text("提示:压缩过程出错。无法完成压缩,请重试或告知管理员。"); + } else { + $("#downloadAllCheckedLoad").text(""); + $("#downloadAllCheckedName").text("提示:压缩完成!准备开始下载..."); + var t = setTimeout( + "$('#downloadAllCheckedModal').modal('hide');", 800); + // POST提交全部下载请求 + var temp = document.createElement("form"); + temp.action = 'homeController/downloadCheckedFilesZip.do'; + temp.method = "post"; + temp.style.display = "none"; + var sl = document.createElement("input"); + sl.name = 'zipId'; + sl.value = result; + temp.appendChild(sl); + document.body.appendChild(temp); + temp.submit(); + } + }, + error : function() { + $("#downloadAllCheckedName").text("提示:请求失败。无法完成压缩,请重试或告知管理员。"); + } + }); } // 删除选中的所有文件 diff --git a/webapps/ROOT/etc/.DS_Store b/work/.DS_Store similarity index 89% rename from webapps/ROOT/etc/.DS_Store rename to work/.DS_Store index a0863e4..d781ecd 100644 Binary files a/webapps/ROOT/etc/.DS_Store and b/work/.DS_Store differ diff --git a/work/Catalina/.DS_Store b/work/Catalina/.DS_Store new file mode 100644 index 0000000..8550af4 Binary files /dev/null and b/work/Catalina/.DS_Store differ diff --git a/work/Catalina/localhost/.DS_Store b/work/Catalina/localhost/.DS_Store new file mode 100644 index 0000000..e69fb33 Binary files /dev/null and b/work/Catalina/localhost/.DS_Store differ diff --git a/work/Catalina/localhost/ROOT/SESSIONS.ser b/work/Catalina/localhost/ROOT/SESSIONS.ser new file mode 100644 index 0000000..fcfd6fe Binary files /dev/null and b/work/Catalina/localhost/ROOT/SESSIONS.ser differ diff --git a/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.class b/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.class index 7cc3de6..5e75d29 100644 Binary files a/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.class and b/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.class differ diff --git a/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.java b/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.java index 91ed4a6..c566cf6 100644 --- a/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.java +++ b/work/Catalina/localhost/ROOT/org/apache/jsp/home_jsp.java @@ -1,7 +1,7 @@ /* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/9.0.0.M17 - * Generated at: 2018-03-23 01:20:08 UTC + * Generated at: 2018-03-29 08:26:44 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. @@ -376,7 +376,9 @@ public final class home_jsp extends org.apache.jasper.runtime.HttpJspBase out.write("\t\t\t\t\t\n"); out.write("\t\t\t\t\n"); out.write("\t\t\t\t
\n"); - out.write("\t\t\t\t\t
选择文件:
\n"); + out.write("\t\t\t\t\t
\n"); + out.write("\t\t\t\t\t\t选择文件:\n"); + out.write("\t\t\t\t\t
\n"); out.write("\t\t\t\t\t \n"); out.write("\t
\n"); out.write("\t"); + out.write('\n'); + out.write(' '); + out.write("\n"); + out.write("\t
\n"); + out.write("\t\t
\n"); + out.write("\t\t\t
\n"); + out.write("\t\t\t\t
\n"); + out.write("\t\t\t\t\t\n"); + out.write("\t\t\t\t\t

\n"); + out.write("\t\t\t\t\t\t 打包下载\n"); + out.write("\t\t\t\t\t

\n"); + out.write("\t\t\t\t
\n"); + out.write("\t\t\t\t
\n"); + out.write("\t\t\t\t\t
\n"); + out.write("\t\t\t\t
\n"); + out.write("\t\t\t\t
\n"); + out.write("\t\t\t\t\t\n"); + out.write("\t\t\t\t\t\n"); + out.write("\t\t\t\t
\n"); + out.write("\t\t\t
\n"); + out.write("\t\t
\n"); + out.write("\t
\n"); + out.write("\t"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); - out.write("\n"); + out.write("\n"); out.write(""); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ diff --git a/说明文档.pdf b/说明文档.pdf index fd1b5a6..f9e9b85 100644 Binary files a/说明文档.pdf and b/说明文档.pdf differ