Created
February 22, 2013 16:01
-
-
Save hc2p/5014441 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleFile: function(file) { | |
if (file.size / 1000000 > 150) { | |
var err = "We only support files up to 150 MB"; | |
alert(err); | |
... | |
} | |
var that = this; | |
$.when(this.upload(file)).pipe(this.getSharedUrl). | |
done(function(response) { | |
that.renderResponse(response); | |
that.postResponse && that.postResponse(response); | |
that.toggleLoadingIcon(); | |
}). | |
fail(function(xhr) { | |
var err; | |
if (xhr.status == 403) { | |
err = 'Your Dropbox account seems to be not connected. Please connect it!'; | |
} | |
else { | |
err = 'Transfer to server not successful. Please check your internet connection or contact our support team.'; | |
} | |
alert(err); | |
... | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment