开发者

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|ImageFields 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜