Created
February 27, 2012 02:34
-
-
Save markdaws/1920886 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
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