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?
Try this:
(.*?)\.(jpg|jpeg|png|gif)$
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)))$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With