开发者

Is there a way to restrict file types on a file field, using AGX tagged values?

开发者 https://www.devze.com 2023-04-03 05:39 出处:网络
Using argo uml and archgenxml, I have a file field. I 开发者_StackOverflowwould like to restrict it to one extension: .ttf

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

精彩评论

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

关注公众号