Hi,
I am using the "HttpRequestBase" class's method to access the file to be uploaded in my MVC application.
The code block I am using in View is
<input type="file" name="myFile" id="myFile">
And jQuery section is
var myFile = document.getElementById('myFile');
if (myFile.files.length > 0) {
mydata.append("uploadedfile", myFile.files[0]);
}
And the controller block is
var content = Request.Files["uploadedfile"];
if (fileContent == null || fileContent.ContentLength <= 0)
{
//Display Error
}
else {
//Process file
}
Finally when I am trying to run the application, I am getting the "Error" block getting executed. This happens only for Chrome v 53.0.2785.116 m. We have not faced this issue with earlier version of Chrome, and also not getting this issue with any other browser.
Can you please help me here as what went wrong for this chrome version and how to overcome this issue?
Thanks,
Durga