Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Allowed file types in ModelAdmin field

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 957 Views
  • timwjohn
    Avatar
    Community Member
    98 Posts

    Allowed file types in ModelAdmin field Link to this post

    I've looked into this before and haven't had much luck. I'm sure there are people out there that have wanted to do the same thing, so I'm resurrecting the question!

    How can you limit the allowed extensions in a FileIframeField in ModelAdmin on the client side? I.e. set the extensions in the 'Files of type' combo in the file upload dialogue.

    I've been able to do this on server side using a validator (i.e. an invalid file extension is discarded upon upload), but it would be much nicer if the files were automatically filtered in the dialogue before the upload. But how?

    957 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.