Skip to content

Instantly share code, notes, and snippets.

@derrickwilliams
Last active August 29, 2015 14:02
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 derrickwilliams/7390bd8e33aec336c0f8 to your computer and use it in GitHub Desktop.
Save derrickwilliams/7390bd8e33aec336c0f8 to your computer and use it in GitHub Desktop.
var input = new mOxie.FileInput({ browse_button: '#filePicker' });
var formData = new mOxie.FormData();
input.bind('change', function(e) {
formData.append('myFile', e.target.files[0]);
var xhr = new mOxie.XmlHttpRequest();
xhr.open('POST', 'http://localhost:3000', true);
xhr.send(formData);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment