javascript - How to upload with 2 dropzone in one form with submit button -
anyone know, how upload 2 dropzone in 1 form have form this
<form> <button id="dropzone1" type="button">upload photo</button> <button id="dropzone2" type="button">upload cv</button> <button onclick="on_save" type="button">upload</button> </form>
and javascript this
$('#dropzone1').dropzone({ url: 'vacancy/save', maxfiles: 1, autoqueue: false, clickable: '#dropzone1', acceptedfiles: 'image/*', }); $('#dropzone2').dropzone({ url: 'vacancy/save', maxfiles: 1, autoqueue: false, clickable: '#dropzone2', acceptedfiles: '.pdf,.doc,.docx,.odt', }); function on_save(){ mydropzone.enqueuefiles(mydropzone.getfileswithstatus(dropzone.added)); }
and when proccess upload, url same url, want data saved in different column, , different location, possible?
maybe array,
my code submit, 1 of file, second file not uploaded
i know stupid question, hope guys can me, thanks
Comments
Post a Comment