我正在努力开发Codeigniter MVC格式的dropzone multifiles上传功能。我阅读了许多关于drop& drag函数的示例,但无法自定义我的项目。你能帮助我吗?
这是我的浏览页面javascript代码
Dropzone.autoDiscover = false;
// Get the template HTML and remove it from the doument
var previewNode = document.querySelector("#template");
previewNode.id = "";
var previewTemplate = previewNode.parentNode.innerHTML; // ?
previewNode.parentNode.removeChild(previewNode); // ?
var myDropzone = new Dropzone("div#dropzone_wrapper", { // Make the whole body a dropzone
url: "/Wtax2/uploadfiles", // Set the url
thumbnailWidth: 80,
thumbnailHeight: 80,
parallelUploads: 20,
previewTemplate: previewTemplate,
//autoQueue: true, // Make sure the files aren't queued until manually added
autoQueue: false,
previewsContainer: "#previews", // Define the container to display the previews
clickable: ".fileinput-button" // Define the element that should be used as click trigger to select files.
});

这是我的控制器代码
public function uploadfiles(){
$data = array();
$data['client_name'] = "주식회사 대기업";
$data['client_biz_no'] = null;
$data['wtax_file_type'] = "지방소득";
$data['all_tax'] = "지방소득세 522,280가감조정금액 0합 계 522,280";
$data['tax_date'] = "2018.01.10";
$res['result'] = TRUE;
$res['msg'] = '성공';
$res['data'] = $data;
$res['files'] = $_FILES;
$this->output_json($res);
}
非常感谢您阅读我的问题。 一切顺利!!