This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
Bug in multiple file upload and queueSizeLimit
  • Hi
    First, let me say that Uploadify is a great plugin.

    I have a form that limits the number of files a user can upload, using queueSizeLimit.
    Auto is set to false (the user must start the upload)
    It works fine IF you select all the files first, then start the upload.
    However, if you chose one file, then start the upload, then select another file, then start the upload, and so on, queueSizeLimit doesn't work (you can continue uploading files beyond the limit set).
    I can confirm this behavior in Safari, Firefox and Chrome (all Mac).

    I've taken a look into the Uploadify code, but I don't seem to find a way to make a "quick-fix", I don't understand how Uploadify "knows" what the queue size is.
    It is important that the limit is enforced, no matter the user's actions.
    Thank you.
  • do one thing when each file upload (in uploadcomplete) count the total file upload.

    now on allcomplete method (of uplodify) using javascript do postback and set the queuesizelimit.

    for e.g. if you wish to set size 100. let user first upload the 50file. then after uploading 50 file do postback and set queuesize limit 100- total uploaded files
    (in our case 50 so 100-50). now you user will allow only 50files to upload. if he upload more then 50 then message will fire.

    let me know if you have any problem.
  • Hello,

    I am having same problem. I have applied 6 File limitation to upload a File on server. Means each user can upload only 6 Files. If he deletes one file than He he can upload 1 more file after delete.

    For this I have used my customized code using counter variable. User can see his uploaded Images as thumb and than he can rename and also can delete image, if he wants to delete it.

    Now, I want to do is "If user had uploaded six files than He can not save image on server and the in the database that file should not be stored."

    Currently the Issue is "If file exceeds more than 6 than also user can upload other files agian by clicking on 'Start upload' button."

    My code is as below.


    var cntUpload = 0;
    var showimagepath = gHOSTURL+'public/uploads/images/campersite_user_photo/';
    $j(document).ready(function() {
    document.getElementById('start_upload').disabled = true;
    document.getElementById('camper_photos_submit').disabled = true;
    //var showimagepath = gHOSTURL+'public/uploads/images/campersite_user_photo/';
    $j('#photo_path').uploadify({
    'uploader' : "<?php echo $registry->HTTP_HOST.'public/js/uploadify.swf';?>",
    'script' : "<?php echo $this->url(array('module' => 'default','controller'=>'usercampersite','action' => 'storeimage','campid' => $this->snCampId),'default',true);?>",
    'cancelImg' : "<?php echo $registry->HTTP_HOST.'public/images/cancel.png';?>",
    'folder' : "",
    'sizeLimit' : 102400 * 100,
    'multi' : true,
    'auto' : false,
    'fileExt' : '*.jpg;*.jpeg;*.bmp;*.gif;*.png;',
    'fileDesc' : 'Image Files',
    'queueSizeLimit' : 6,
    'simUploadLimit' : 2,
    'removeCompleted': false,
    'onSelectOnce' : function(event,data) {
    document.getElementById('start_upload').disabled = false;
    document.getElementById('camper_photos_submit').disabled = true;
    document.getElementById('cancel').disabled = true;
    //$j('#status-message').text(data.filesSelected + ' files have been added to the queue.');
    },
    'onSelect' : function(event,ID,fileObj) {
    cntUpload++;
    alert("onSelect = "+cntUpload);
    if(cntUpload > 6)
    {
    alert('You can upload maximum 6 Files.');
    $j('#photo_path').uploadifyCancel(ID);
    return false;
    }

    },
    'onCancel' : function(event,ID,fileObj,data) {
    cntUpload--;
    alert("onCancel = "+cntUpload);
    },
    'onComplete': function (evt, queueID, fileObj, response, data)
    {
    document.getElementById('photo_path').disabled = true;
    document.getElementById('start_upload').disabled = true;
    document.getElementById('camper_photos_submit').disabled = false;
    document.getElementById('cancel').disabled = true;
    if(response != 'error')
    {
    //cntUpload++;
    //alert("onComplete = "+cntUpload);
    var photoInfo = response.split(',');
    ssTextName = 'ssTitle_'+queueID;
    ssHtml = '';
    ssHtml += '';
    ssHtml += 'image';
    ssHtml += '  ';
    ssHtml += '';
    ssHtml += '  ';
    ssHtml += 'Delete';
    ssHtml += '  ';
    ssHtml += 'Update';
    //document.getElementById('photo_path'+queueID).innerHTML = 'image';
    document.getElementById('photo_path'+queueID).innerHTML = ssHtml;
    }
    else
    {
    document.getElementById('photo_path'+queueID).innerHTML = 'Error in File Upload.';
    }
    },
    'onAllComplete' : function(event,data)
    {
    document.getElementById('start_upload').disabled = true;
    document.getElementById('camper_photos_submit').disabled = false;
    document.getElementById('cancel').disabled = true;
    }
    });
    });

    function deletePhoto(snQueueid,snFileName,snFileId)
    {
    $j.ajax({
    type: 'POST',
    url: "<?php echo $this->url(array('module' => 'default','controller'=>'usercampersite','action' => 'deleteimage'),'default',true);?>",
    data: 'fname='+snFileName+'&photoid='+snFileId,
    success: function(response)
    {
    if(response != 'error')
    {
    cntUpload--;
    alert("deletePhoto = "+cntUpload);
    document.getElementById('photo_path'+snQueueid).innerHTML = response;
    document.getElementById('photo_path'+snQueueid).style.display = 'none';
    }
    }
    });

    }

    function updatePhoto(snQueueid,snFileName,snFileId,snTextId)
    {
    txtPhotoName = document.getElementById(snTextId).value;
    $j.ajax({
    type: 'POST',
    url: "<?php echo $this->url(array('module' => 'default','controller'=>'usercampersite','action' => 'saveimage'),'default',true);?>",
    data: 'fname='+snFileName+'&photoid='+snFileId+'&name='+txtPhotoName,
    success: function(response)
    {
    ssTextName = 'ssTitle_'+snQueueid;
    ssHtml = '';
    ssHtml += '';
    ssHtml += 'image';
    ssHtml += '  ';
    ssHtml += txtPhotoName;
    ssHtml += '  ';
    ssHtml += 'Delete';


    Please check below code and let me know that "What I have to do to stop File Upload Functionality after user completed his Six File upload."

    With Thanks,
    Ronit Passwala
    //document.getElementById('photo_path'+queueID).innerHTML = 'image';
    document.getElementById('photo_path'+snQueueid).innerHTML = ssHtml;
    }
    });

    }