Last active
August 29, 2015 14:10
-
-
Save premchandpl/47bfcb24e1f2a8fac908 to your computer and use it in GitHub Desktop.
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
$(function () { | |
var fileCountCheck = 0; | |
$("#btnSubmit").click(function () { | |
var data = []; | |
var fileArray = []; | |
$("#attachFilesContainer input:file").each(function () { | |
if ($(this)[0].files[0]) { | |
fileArray.push({ "Attachment": $(this)[0].files[0] }); | |
} | |
}); | |
data.push({"FirstName": $("#txtFirstName").val().trim(), "LastName": $("#txtLastName").val().trim(), "Files": fileArray}); | |
createItemWithAttachments("MyList", data).then( | |
function(){ | |
alert('Item created with Multiple attachments'); | |
}, | |
function(sender, args){ | |
console.log('Error occured' + args.get_message()); | |
} | |
); | |
}); | |
..... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment