I am having problems saving uploader
as this
context when calling onSubmit
. Can any JS gurus help?
uploader: { init: function(){ var that = this; var fileUploader = new Uploader.FileUploaderBasic({ button : $("#upload-btn")[0], action : "/filesCollection", onSubmit : that.onSubmit }); _.bindAll(this, this.onSubmit);
Results with the following error:
Uncaught TypeError: Cannot read property 'bind' of undefined
Example: http://jsfiddle.net/WilsonPage/BE3Lp/5/
source share