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.
"this.cancelUpload is not a function"
  • I use the checkExisting option to check if the file about to be uploaded already exists or not.
    When a present file is detected and I click "Cancel" in the confirm dialogue to keep the old file, Uploadify hangs and I get the JavaScript-error:

    Error: this.cancelUpload is not a function
    Source: [my dev site]/uploadify/jquery.uploadify-3.1.min.js
    Row: 16

    Any ideas?
  • I just stumbled upon this issue aswell. Looking in the non-minified source, It seems like

    if (!overwrite) {
    this.cancelUpload(file.id);

    at line 925, should be calling a different method, or referencing a another "this". I'm trying to debug for a solution, but am nowhere near an expert of javascript.
  • Declaring an object in a higher scope, setting it to "this" in onUploadStart and using it in the success function will work.
    But the function seems to start a new upload (if more in queue) in the background, while the confirm-box is still blocking me, thus overwriting my nextly files without my interaction.

    For now, i'm commenting out the continued startUpload stuff, and simply call the cancel function via my fileUpload's uploadify, easiest possible. Like so.

    if (!overwrite) {
    $('#fileUpload').uploadify('cancel', file.id);
    }

    Perhaps not a feasable solution. A bug report might be in order.
  • I've faced similar problem. So i solved this using this code. Hope it will help you all.
    if (!overwrite) {
    var uploadifyID = '#'+settings.id;
    $(uploadifyID).uploadify('cancel', file.id);
    }

    To clarify, in the uploadify script just delete everything inside the if(!overwrite)
    and just put this two line
    var uploadifyID = '#'+settings.id; $(uploadifyID).uploadify('cancel', file.id);

    There is also another solution but that works for only one existing file in queue.
    just add var that = this; in onUploadStart function and then replace all this inside the if(!overwrite) with that. So the script will be look like

    that.cancelUpload(file.id);

    $('#' + file.id).remove();
    if (that.queueData.uploadQueue.length > 0 && that.queueData.queueLength > 0) {
    if (that.queueData.uploadQueue[0] == '*') {
    that.startUpload();
    } else {
    that.startUpload(that.queueData.uploadQueue.shift());
    }
    }
  • Cool! Thanks moin_ku07, your solution worked for me (replacing the mentioned code with var uploadifyID = '#'+settings.id; $(uploadifyID).uploadify('cancel', file.id);)
  • Worked for me in Uploadify 3.2. Thanks, moin_ku07.