asp.net mvc c# Request.Files[0].ContentLength getting zero internet explorer -


File size validation in Internet Explorer is not working, it works fine in Firefox. This is posting on octet in Internet Explorer, what could be the reason?

  session ["content length"] = (request file [0]. Contact lamb / 1024); Session ["content type"] = request File [0]. Content type; Byte [] B = new byte [request.file [0]. Content lent]; request. Files [0] .OperStream Read (B, 0, Request file [0] .contentLength); Session ["Contest Stream"] = B; Return content (request file [0]. Type content + ";" + request file [0]. Contact lang / 1024);  

A file upload module in which to maintain a legacy ASP application, I face a strange The error has to be done, where in a short time, the user's upload will be rejected (we were filtered on the mime type so that only certain file types are allowed) even if it is a valid file type.

This problem may be an incompatibility with Microsoft Office applications if the user tries to upload an office file in their respective software (for example: .doc file to open), the maim-type It will be reported incorrectly as OAK-stream.


Comments