nizongfeng 1 year ago
parent
commit
82591c5055
5 changed files with 10 additions and 34 deletions
  1. +1
    -1
      public/assets/js/dropzone.js
  2. +1
    -1
      public/assets/js/dropzone.min.js
  3. +3
    -11
      public/assets/js/require-backend.min.js
  4. +3
    -11
      public/assets/js/require-frontend.min.js
  5. +2
    -10
      public/assets/js/require-upload.js

+ 1
- 1
public/assets/js/dropzone.js View File

@@ -256,7 +256,7 @@ function (_Emitter) {
* the event `maxfilesexceeded` will be called. The dropzone element gets the
* class `dz-max-files-reached` accordingly so you can provide visual feedback.
*/
maxFilesize: 256,
maxFilesize: 500,

/**
* The name of the file param that gets transferred.


+ 1
- 1
public/assets/js/dropzone.min.js
File diff suppressed because it is too large
View File


+ 3
- 11
public/assets/js/require-backend.min.js
File diff suppressed because it is too large
View File


+ 3
- 11
public/assets/js/require-frontend.min.js
File diff suppressed because it is too large
View File


+ 2
- 10
public/assets/js/require-upload.js View File

@@ -158,15 +158,7 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined,
mimetype = mimetype === '*' ? null : mimetype;

//最大文件限制转换成mb
var maxFilesize = (function (maxsize) {
var matches = maxsize.toString().match(/^([0-9\.]+)(\w+)$/);
var size = matches ? parseFloat(matches[1]) : parseFloat(maxsize),
unit = matches ? matches[2].toLowerCase() : 'b';
var unitDict = {'b': 0, 'k': 1, 'kb': 1, 'm': 2, 'mb': 2, 'gb': 3, 'g': 3, 'tb': 4, 't': 4};
var y = typeof unitDict[unit] !== 'undefined' ? unitDict[unit] : 0;
var bytes = size * Math.pow(1024, y);
return bytes / Math.pow(1024, 2);
}(maxsize));
var maxFilesize = 500;

var options = $(this).data() || {};
delete options.success;
@@ -195,7 +187,7 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined,
},
chunking: chunking,
chunkSize: chunkSize,
maxFilesize: maxFilesize,
maxFilesize: 500,
acceptedFiles: mimetype,
maxFiles: (maxcount && parseInt(maxcount) > 1 ? maxcount : (multiple ? null : 1)),
timeout: timeout,


Loading…
Cancel
Save