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.
  • Just a quick request / suggestion.

    I think it would be pretty beneficial to switch the context of "this" within the user defined functions onInit, onSelect, onSelectOnce, onCancel, onClearQueue, onError, onProgress, onComplete, and onAllComplete.

    This is a very simple change using the JavaScript function "apply", more information on which can be found at https://developer.mozilla.org/en/Core_J ... tion/apply.

    I suggest the following changes, all line numbers will refer to the jquery.uploadify (Source).js file.

    onInit (line 125):
    if (settings.onInit() !== false) {

    changes to
    if (settings.onInit.apply(this) !== false) {


    onSelect(line 136):
    if (event.data.action(event, queueID, fileObj) !== false) {

    changes to
    if (event.data.action.apply(this, arguments) !== false) {


    onSelectOnce requires no change

    onCheck(line 179):
    if (event.data.action(event, checkScript, fileQueue, folder, single) !== false) {

    changes to
    if (event.data.action.apply(this, arguments) !== false) {


    onCancel(line 194):
    if (event.data.action(event, queueID, fileObj, data) !== false) {

    changes to
    if (event.data.action.apply(this, arguments) !== false) {


    onClearQueue(line 199):
    if (event.data.action() !== false) {

    changes to
    if (event.data.action.apply(this) !== false) {


    onError(line 204):
    if (event.data.action(event, queueID, fileObj, errorObj) !== false) {

    changes to
    if (event.data.action.apply(this, arguments) !== false) {


    onProgress(line 210):
    if (event.data.action(event, queueID, fileObj, data) !== false) {

    changes to
    if (event.data.action.apply(this, arguments) !== false) {


    onComplete(line 219):
    if (event.data.action(event, queueID, fileObj, unescape(response), data) !== false) {

    changes to
    if (event.data.action.apply(this, arguments) !== false) {

    Note: if you want to preserve the unescape(response) then use the following:
    if (event.data.action.apply(this, [event, queueID, fileObj, unescape(response), data]) !== false) {


    onAllComplete requires no change


    These changes allow developers to easily replicate the default behavior of the events with slight modification, take for instance the following onInit:

    $(this).css('display','none');
    var me = this;
    $(\"#upload-\"+$(this).attr('id'))
    .click(
    function() {
    $(me).fileUploadStart();
    }
    );

    if ($.browser.msie) {
    $(this).after('<div id=\"' + $(this).attr(\"id\") + 'Uploader\"></div>');
    document.getElementById($(this).attr(\"id\") + 'Uploader').outerHTML = flashElement;
    } else {
    $(this).after(flashElement);
    }

    $putAfter = $(this).parent().hasClass('browseBtn') ? $(this).parent() : $(\"#\" + $(this).attr('id') + \"Uploader\");

    $putAfter.after('<div id=\"' + $(this).attr('id') + 'Queue\" class=\"fileUploadQueue\"></div>');
    return false;



    On the whole this change allows developers greater flexibility when writing their on[ ] functions, and allows them to replicate the default behaviors more closely.
  • This is 100% correct, if you are setting up a custom event listener and you want to perform some jquery related tasks having a this object which is completely empty is totally confusing - especially as you only get a totally useless error in firebug (as this is an externalinterface thingy).

    I just patched my version with this and it works beautiful - thanks to bnorick for the addition. If you do not want to implement that please put at least a notice inside of the docs that $(this) will not yield the expected result.