Created
March 23, 2017 14:45
-
-
Save mariapaulinar/240bd23e71df195ca9bd7a9e9b4e645f to your computer and use it in GitHub Desktop.
Subir archivos por ajax
This file contains 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
$( '#my-form' ) | |
.submit( function( e ) { | |
$.ajax( { | |
url: 'http://host.com/action/', | |
type: 'POST', | |
data: new FormData( this ), | |
processData: false, | |
contentType: false | |
} ); | |
e.preventDefault(); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment