How to set the file types in the coolite FileUploadField
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 th开发者_开发问答e web. Can anyone give me a hint on this one?
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]))$"
精彩评论