Multiple Uploadifive in one page is not working

Posted by jalf on Stack Overflow See other posts from Stack Overflow or by jalf
Published on 2012-08-13T08:28:38Z Indexed on 2012/09/27 9:37 UTC
Read the original article Hit count: 860

Filed under:

Hello I take my chances here at stack, because uploadify forums is not very responsive and full of spam,

I am using uploadifive w/ drag and drop it was amazing but multiple upload buttons in one page is not working. Below is my code:

HTML

<input type="file" name="file_upload_1" id="file_upload_1"/>
<input type="file" name="file_upload_2" id="file_upload_2"/>

JS

$('#file_upload_1').uploadifive({
    'auto'         : true,
    'method'       : 'post',
    'queueID'      : 'queue',
    'fileType'     : ['text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel','application/force-download'],
    'uploadScript' : 'upload.php',
    'onUploadComplete' : function(file, data) {
        console.log(data);
        }
    });
 $('#file_upload_2').uploadifive({
    'auto'         : true,
    'method'       : 'post',
    'queueID'      : 'queue',
    'fileType'     : ['text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel','application/force-download'],
    'uploadScript' : 'upload.php',
    'onUploadComplete' : function(file, data) {
        console.log(data);
        }
    });

© Stack Overflow or respective owner

Related posts about jQuery