File Upload with RegularExpressionValidator not working with Firefox only IE
10,455
Solution 1
I found the solution.....
(.*\.([gG][iI][fF]|[jJ][pP][gG]|[jJ][pP][eE][gG]|[bB][mM][pP])$)
Enjoy!!!
Solution 2
Try this:
(.*?)\.(jpg|jpeg|png|gif)$
Solution 3
An enhancement to DaDa's solution that caters for case-sensitivity:
^(.*?)\.(((j|J)(p|P)(e|E)?(g|G))|((p|P)(n|N)(g|G))|((g|G)(i|I)(f|F)))$
Author by
Etienne
Updated on June 08, 2022Comments
-
Etienne almost 2 years
I have a FileUpload with a RegularExpressionValidator with the following Validation Expression:
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.gif|.jpg|.JPG|.JPEG|.GIF|.jpeg|.png|.bmp|.3dm|.3dmf|.ai|.drw|.dxf|.esp|.mng|.png|.ps|.psp|.svg|.tiff)$
This way I make sure the User only upload images. But for some reason it does not work when I use Firefox. Why is that and how can I go around the problem?