0
votes

Im using Uploadify flash version with a form to optionally upload a file. It works fine except when the user does not have a file in the queue, then the uploader script does not get hit. I want to hit this regardless of whether a file has been selected for upload. Any ideas how I can do this?

1

1 Answers

0
votes

I did it by checking if there is a file in the queue. if there is, execute uploadify and return false to .submit(). If there is no file, return true to .submit()

$('#file-upload-form').submit(uploadFiles);

uploadFiles = function(event){

        //check if files in the queue, if so, execute uploadify and return false
        if(checkIfFile()){
          $('#uploadify-button-wrapper').uploadify("upload", "*");  
          return false;
        }    

// no file so return true
return true;
}