调整文件上传 safe 类型 # Anyon

This commit is contained in:
Anyon 2020-03-28 10:16:05 +08:00
parent 82ef259aaa
commit daf5fcc90a

View File

@ -5,7 +5,7 @@ define(['md5'], function (SparkMD5, allowExtsMimes) {
options = {element: $(element), exts: [], mimes: [], files: {}, cache: {}, loading: 0};
options.count = {total: 0, uploaded: 0};
options.type = options.element.data('type') || '';
options.safe = parseInt(options.element.data('safe') || '');
options.safe = options.element.data('safe') ? 1 : 0;
options.types = options.type ? options.type.split(',') : [];
options.field = options.element.data('field') || 'file';
options.input = $('[name="_field_"]'.replace('_field_', options.field));