从“4.2.0”升级到“5.7.0”后 Dropzone 停止工作(使用 jquery“3.3.1”)
Dropzone stopped working after upgrade from "4.2.0" to "5.7.0" (using jquery "3.3.1")
我像这样加载我的库:
<link href="~/lib/dropzone/dropzone.min.css" rel="stylesheet" />
<script src="~/lib/dropzone/dropzone.min.js"></script>
<script src="~/Scripts/jquery-3.3.1.min.js"></script>
我这样使用我的 dropzone:
var CountFiles = 0;
Dropzone.autoDiscover = false;
jQuery(document).ready(function () {
Dropzone.autoDiscover = false;
$("div#myPrincipalDropzone").dropzone({ ...etc.... even another dropzones...
这之前是有效的,但我不确定为什么我得到 dropzone is not defined。
此外,如果我将 libs explicitellty 放在索引上,我会收到“'Symbol(Symbol.iterator)' 未定义”
尝试添加多个 Dropzone.autoDiscover = false;还更改函数的语法。任何想法?
这是正确的语法:
<script type="text/javascript">
var CountFiles = 0;
$(document).ready(function () {
Dropzone.autoDiscover = false;
var Drop1 = new Dropzone("div#myPrincipalDropzone", { url: "/Article/UploadFiles",
paramName: "file",
maxFiles: 1,
maxFilesize: 1200,
maxFileHeight: 840,
maxFileWidth: 840,
acceptedFiles: ".png,.jpg",
addRemoveLinks: true,
parallelUploads: 1,
renameFile: function () {
let newname = new Date().getTime() + '_' + 'Test';
console.log("Nombre en RenameFile:" + newname);
return newname;
//},
//init: function (newname) {
this.on("addedfile", function (file) {
我像这样加载我的库:
<link href="~/lib/dropzone/dropzone.min.css" rel="stylesheet" />
<script src="~/lib/dropzone/dropzone.min.js"></script>
<script src="~/Scripts/jquery-3.3.1.min.js"></script>
我这样使用我的 dropzone:
var CountFiles = 0;
Dropzone.autoDiscover = false;
jQuery(document).ready(function () {
Dropzone.autoDiscover = false;
$("div#myPrincipalDropzone").dropzone({ ...etc.... even another dropzones...
这之前是有效的,但我不确定为什么我得到 dropzone is not defined。 此外,如果我将 libs explicitellty 放在索引上,我会收到“'Symbol(Symbol.iterator)' 未定义”
尝试添加多个 Dropzone.autoDiscover = false;还更改函数的语法。任何想法?
这是正确的语法:
<script type="text/javascript">
var CountFiles = 0;
$(document).ready(function () {
Dropzone.autoDiscover = false;
var Drop1 = new Dropzone("div#myPrincipalDropzone", { url: "/Article/UploadFiles",
paramName: "file",
maxFiles: 1,
maxFilesize: 1200,
maxFileHeight: 840,
maxFileWidth: 840,
acceptedFiles: ".png,.jpg",
addRemoveLinks: true,
parallelUploads: 1,
renameFile: function () {
let newname = new Date().getTime() + '_' + 'Test';
console.log("Nombre en RenameFile:" + newname);
return newname;
//},
//init: function (newname) {
this.on("addedfile", function (file) {