Revisions
-
jacobtwlee renamed this gist
Apr 14, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jacobtwlee revised this gist
Mar 31, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function sendFile(fileData) { processData: false, success: function (data) { if (data.success) { alert('Your file was successfully uploaded!'); } else { alert('There was an error uploading your file!'); } -
jacobtwlee created this gist
Mar 30, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ function sendFile(fileData) { var formData = new FormData(); formData.append('imageData', fileData); $.ajax({ type: 'POST', url: '/your/upload/url', data: formData, contentType: false, processData: false, success: function (data) { if (data.success) { alert('Your file was successfully uploaded'); } else { alert('There was an error uploading your file!'); } }, error: function (data) { alert('There was an error uploading your file!'); } }); }