|
|
@@ -7387,7 +7387,7 @@ define('upload',['jquery', 'bootstrap', 'dropzone', 'template'], function ($, un
|
|
|
}
|
|
|
$(this).attr("initialized", true);
|
|
|
var that = this;
|
|
|
- var id = $(this).prop("id");
|
|
|
+ var id = $(this).prop("id") || $(this).prop("name") || Dropzone.uuidv4();
|
|
|
var url = $(this).data("url");
|
|
|
var maxsize = $(this).data("maxsize");
|
|
|
var maxcount = $(this).data("maxcount");
|
|
|
@@ -7431,12 +7431,12 @@ define('upload',['jquery', 'bootstrap', 'dropzone', 'template'], function ($, un
|
|
|
return bytes / Math.pow(1024, 2);
|
|
|
}(maxsize));
|
|
|
|
|
|
- var options = $("#" + id).data() || {};
|
|
|
+ var options = $(this).data() || {};
|
|
|
delete options.success;
|
|
|
delete options.url;
|
|
|
multipart = $.isArray(multipart) ? {} : multipart;
|
|
|
|
|
|
- Upload.list[id] = new Dropzone("#" + id, $.extend({
|
|
|
+ Upload.list[id] = new Dropzone(this, $.extend({
|
|
|
url: url,
|
|
|
params: function (files, xhr, chunk) {
|
|
|
var params = multipart;
|