Is there a way to restrict file types on a file field, using AGX tagged values?
Using argo uml and archgenxml, I have a file field. I 开发者_StackOverflowwould like to restrict it to one extension: .ttf
Can I do this using a tagged value? Also is there a glossary for the AGXProfile which would answer this?
You could try the allowable_content_types
mime type property of FileField|ImageField
s but I can't find anything that indicates that validation is done on that property. IOW, this wouldn't show the user an error if they uploaded something else. If you want that, you're going to have to write an AT field validator yourself that takes the file and validates it against the mimetype_registry
.
精彩评论