Question

I using coolite in my project. And upload files through the FileUploadField control. I have to add a filter for the file type, so that the user could see only jpeg and bmp files from the choose file dialog. Havent found how this can be implemented in the web. Can anyone give me a hint on this one?

Was it helpful?

Solution

Unfortunately, this isn't possible through the standard browse-for-file box that appears, however you can instead use a RegularExpressionValidator to validate the filename (regex below untested):

ValidationExpression="^(.*)\.(([jJ][pP][eE]?[gG])|([bB][mM][pP]))$"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top