ASP.Net FileUpload not working in Google Chrome

ASP.Net FileUpload does not work in google chrome.It shows a validation error, even after choosing the correct file type. Any solution?

Here is the code:

 <asp:FileUpload ID="FU1" runat="server"  />
    <asp:RegularExpressionValidator 
    id="FileUpLoadValidator" runat="server" 
    ErrorMessage="Upload jpg and gif only." 
    ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)$" 
    ControlToValidate="FU1">
    </asp:RegularExpressionValidator>
+3
source share
1 answer

Are you still getting an error when using a more open regex?

ValidationExpression="^.+\.((jpg)|(JPG))$"
+4
source

Source: https://habr.com/ru/post/1742382/


All Articles