Created
February 27, 2013 18:13
-
-
Save hpneo/5050137 to your computer and use it in GitHub Desktop.
FileUpload with FormData
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 data = new FormData(); | |
| data.append('videoshow[title]', 'FormData'); | |
| data.append('videoshow[logo]', $('#videoshow_logo')[0].files[0]); | |
| var xhr = $.ajax({ | |
| url: '/admin/videoshows', | |
| dataType : 'script', | |
| contentType: false, | |
| cache: false, | |
| processData: false, | |
| type: 'POST', | |
| data: data | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment