I am using dropzone for file attachment and upload, I dont want to bind dropzone with form elements as i can not put form inside form,
So i binded it to div element using jquery,
I can upload document correctly with this, but i can not find any way to give options when using as jquery,
below are my codes,
I had binded dropzone as class and ID, If i remove class, then dropzone is not attaching to div and i can not attach file.
<div class="dropzone" id="dropzoneattach">
</div>
Here is Jquery,
$("#dropzoneattach").dropzone({
paramName : 'userfile',
url: "<?php echo base_url()?>index.php/news/add_attachments",
});
why i am binding with this, because i want file name which uploads as userfile, not file.
While doing this way, i can not upload file,
If there anything wrong? How to give dropzone options when dropzone is creating programatically, i tried to look in documentation but could not understood,
Thanks advanced.
Finally, i found myself, Below is just binded with class,
$(".dropzone").dropzone({
paramName : 'userfile',
url: "<?php echo base_url()?>index.php/news/add_attachments"
)}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.