Skip to content

Instantly share code, notes, and snippets.

@markdaws
Created February 27, 2012 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markdaws/1920886 to your computer and use it in GitHub Desktop.
Save markdaws/1920886 to your computer and use it in GitHub Desktop.
s$(this).ajaxSubmit({
error: function(xhr) {
status('Error: ' + xhr.status);
},
success: function(response) {
if(response.error) {
status('Opps, something bad happened');
return;
}
var imageUrlOnServer = response.path;
status('Success, file uploaded to:' + imageUrlOnServer);
$('<img/>').attr('src', imageUrlOnServer).appendTo($('body'));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment