I'm using Blueimp JQueryFileUpload from https://github.com/blueimp/jQuery-File-Upload
What I want is to set default options to the plugin, so I dont have to execute them everytime I use it, and in some specifics scenarios I will want to override my own default configurations.
I'm using the UI version of the plugin, and I want to set my own 'fileuploaddone' callback globally.
In some other plugins I achieve this throug
$.otherPlugin.options = { some : 'Default Options' }
A time after posting my question I finally found the solution in the documentation.
As described in the docs:
The recommended way to extend the jQuery File Upload plugin is by using the extension mechanism of the jQuery UI Widget Factory. This allows to override default Options (including callback methods) as well as methods of the File Upload widget class.
So, the following code can be used to override some default options
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
options: {
autoUpload: false
}
});
More informations can be foun at the official docs. https://github.com/blueimp/jQuery-File-Upload/wiki/Plugin-extensions.