Hi Guys
Im doing a file upload, at first i was using fineuploader, then changed to simple ajax. The error i get is similar the "xhr:An unhandled exception was thrown by the Web Application." Now this works locally but doesn't work on the server, what am I missing on IIS configs? Kindly assist.
//Below is the JS
- var formData = new FormData();
- var file = $('#fileID')[0];
-
- formData.append('file', file.files[0]);
- $.ajax({
- url: '/api/document/uploads/',
- type: 'POST',
- data: formData,
- contentType: false,
- processData: false,
- success: function (result) {
-
- },
- error: function (result) {
-
- }
- });
//Below is the api
- [HttpPost]
- [Route("api/document/uploads")]
- public async Task<object> UploadDoc()
- {
- }