Error - $(that).fileupload("option", "done").call is not a function

546 views
Skip to first unread message

norman ancajas

unread,
Sep 19, 2012, 7:32:13 AM9/19/12
to jquery-f...@googlegroups.com

I'm using this plugin for a Rails app, and I followed this tutorial and this example.

However I encounter the ff error in the console

$(that).fileupload("option", "done").call is not a function

from this snippet here from the main.js file:

// Load existing files:
    $('#fileupload').each(function () {
        var that = this;
        $.getJSON(this.action, function (result) {
            if (result && result.length) {
                $(that).fileupload('option', 'done')
                  .call(that, null, { result:result });
            }
        });
    });
 

Regardless of the error message above, the files I uploaded were saved in the database. However I encountered unexpected behaviors in the file upload form.
1. The existing files were not rendered, even though JSON data was retrieved.
2. The selected files for upload were not rendered also.
3. After file selection, the file/s are automatically saved (even if I didn't set autoUpload = true). I understand that this is not default behavior.

norman ancajas

unread,
Sep 19, 2012, 9:37:49 AM9/19/12
to jquery-f...@googlegroups.com
I've found a solution for this error.

Apparently, I missed including the jquery.fileupload-ui.js file.
Reply all
Reply to author
Forward
0 new messages