-
-
Save lesm/0bbace5e5cfdda427a2da401a9f9f604 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
| var formData = new FormData(), | |
| $input = $('#avatar'); | |
| formData.append('user[avatar]', $input[0].files[0]); | |
| $.ajax({ | |
| url: this.model.url(), | |
| data: formData, | |
| cache: false, | |
| contentType: false, | |
| processData: false, | |
| type: 'PUT' | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment