Browse Source

refactor: 调差-附件上传大小调整至30M

lanjianrong 5 years ago
parent
commit
101b534efd
2 changed files with 4 additions and 4 deletions
  1. 3 3
      app/public/js/material_file.js
  2. 1 1
      app/view/material/file_modal.ejs

+ 3 - 3
app/public/js/material_file.js

@@ -129,11 +129,11 @@ $(document).ready(function () {
  */
 function validateFiles(files) {
     return files.every(file => {
-        if (file.size > 1024 * 1024 * 10) {
-            toastr.error('文件大小限制为10MB');
+        if (file.size > 1024 * 1024 * 30) {
+            toastr.error('文件大小限制为30MB');
             return false
         }
-        if (whiteList.indexOf(file.ext) === -1) {
+        if (whiteList.indexOf('.' + file.ext) === -1) {
             toastr.error('请上传正确的格式文件');
             return false
         }

+ 1 - 1
app/view/material/file_modal.ejs

@@ -9,7 +9,7 @@
       </button>
         </div>
         <div class="modal-body">
-          <p>大小限制:10MB,支持office等文档格式、图片格式、压缩包格式</p>
+          <p>大小限制:30MB,支持office等文档格式、图片格式、压缩包格式</p>
                   <p>
                       <input id="upload-fujian-file" type="file" multiple="multiple">
                       <!-- <a href="javascript: void(0);" id="upload-fujian" class="btn btn-primary">选择文件</a> -->