dropzone.js isn't starting to transfer files even with autoProcessQueue set to true -
i've set simple dropzone form accept images following settings:
<form action="/upload" method="post" class='dropzone' id='assetadd' enctype="multipart/form-data"></form> <script> dropzone.options.assetadd = { uploadmultiple: false, maxfiles: 1, maxfilesize: 10, acceptedfiles: "image/*,*.jpg,*.gif,*.png"}; </script>
however while can select image files , when see thumbnail , no errors in javascript console transfer never begins.
this mistake cost me 4 productive hours, hope can others end in same trap. problem comes misconfiguration of acceptedfiles
, correct configuration should be:
acceptedfiles: "image/*,.jpg,.gif,.png"
a reference why can seen in source of dopzone (on line #176):
a file extension starting stop character (u+002e). (e.g.: ".jpg,.png,.doc") (source)
file extensions must start .
, not work wildcard selectors on command line.
Comments
Post a Comment