I have below piece of code using jQuery file upload control. As per below code, added input type of file. And my requirement is after displaying file upload user interface, when you click on the Browse, it should call the Web API controller. But with below piece of code I am getting the below error
Exception was thrown at line 2, column 22009 in http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'compareDocumentPosition'
After getting above error, when I click on Break, I am getting another error: Unhandled exception at line 991, column 13 in http://localhost:30383/jquery.fileupload.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method '_on'
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head><body><script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></script><script src="../../Scripts/jquery-ui-1.8.24.min.js"></script><script src="../JS/jquery.iframe-transport.js"></script><script src="../JS/jquery.fileupload.js"></script>
<input id="fileuploaddemo" type="file" name="files[]" data-url="server/php/" multiple>
<script type="text/javascript">
$(document).ready(function () {
$('# fileuploaddemo).fileupload({
url:<<Here I mentioned API controller address’,
type: 'POST',
dataType: 'json'
});
});
</script>
</body>
</html>
User contributions licensed under CC BY-SA 3.0