These categories are meant primarily for organizing media files in the library.
Simple manager which exists only to supply .select_related("parent") on querysets since we can’t even __unicode__ efficiently without it.
MediaFile(id, file, type, created, copyright, file_size)
Abstract media file class. Includes the feincms.models.ExtensionsMixin because of the (handy) extension mechanism.
>>> t = MediaFileBase()
>>> t.determine_file_type('foobar.jpg')
'image'
>>> t.determine_file_type('foobar.PDF')
'pdf'
>>> t.determine_file_type('foobar.jpg.pdf')
'pdf'
>>> t.determine_file_type('foobar.jgp')
'other'
>>> t.determine_file_type('foobar-jpg')
'other'
Method for showing the file name in admin.
Note: This also includes a hidden field that can be used to extract the file name later on, this can be used to access the file name from JS, like for example a TinyMCE connector shim.
Translated media file caption and description.