Skip to content

Instantly share code, notes, and snippets.

@kapkaev
Created August 3, 2012 10:01
Show Gist options
  • Save kapkaev/3246389 to your computer and use it in GitHub Desktop.
Save kapkaev/3246389 to your computer and use it in GitHub Desktop.
$('#image_image').change(function()
{
form=document.getElementById('new_image')
data=new FormData(form)
var xhr = new XMLHttpRequest();
xhr.open("POST", "images");
xhr.send(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment