Dropzone

 

2022-05-17

install::

github::

docs:: https://docs.dropzone.dev/


传递完整路径名或自定义数据

1
Dropzone.autoDiscover = false;
2
var myDropzone = new Dropzone("#my-dropzone",
3
{
4
url: "/upload",
5
dictDefaultMessage: '拖动文件夹进行上传',
6
paramName: "中公"
7
});
8
9
myDropzone.on("sending", function(file, xhr, formData) {
10
// get the original fullPath and add it to the multipart form.
11
var blob = new Blob([file.fullPath], { type: "text/plain"});
12
formData.append("originalPath", blob);
13
});