I have an ASP.NET MVC application. This application requires jQuery 2.1 due to other jquery plugins in the application. I am trying to provide the user with the ability to upload photos. In an attempt to do this, I watched the jQuery file downloader . My JavaScript looks like this:
$('#userPicture').fileupload({ dataType: 'json', done: function (e, data) { } });
UserPicture markup is as follows:
<input id="userPicture" type="file" name="userPicture" data-url="/pictures/User/@ViewBag.UserId">
The page initially loads without errors. However, when I select a picture, I get an error message:
Uncaught Error: no such method 'process' for fileupload widget instance jquery-2.1.1.js:250
Image preview is not displayed. How can I select an image and show client-side preview through a jQuery plugin that works in IE 8+
javascript jquery asp.net-mvc
JQuery Mobile
source share