Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

manage files/images in model admin


4 Posts   1539 Views


24 July 2010 at 2:34am Community Member, 80 Posts

Hello all,

I want to manage "files" in model admin.
I have a dataobject called "Project" and it has a "has_many" relationship to "File".

File appears in the tabs on the left side. But when I click "create 'File'" I get the fields from the table "File" to edit.
That´s of course quite to much. There should be something like a file upload.

Is this possible?

many thx,


24 July 2010 at 3:01am (Last edited: 25 July 2010 6:31am), Forum Moderator, 1796 Posts

I'd love a good answer to this...

currently I have been using either...
a) the dataobject either has a whole bunch of $has_one 'Image' (Image1, Image2,...) and then I use SimpleImageField on the public facing site and the default field type in the ModelAdmin
b) I have a $has_one 'Folder' in the assets where the admin then uploads all relevant media into that part
c) (which I do not do anymore) is $has_many to a small data object that contains only a $has_one 'Image' this means you can add/remove as many as you'd like on a thrid tab but the amount of clicks is obscene so it was dropped for one of the above

...I know there is the DOM with SWFUpload and Uncle Cheese should be rightly proud of this and explain how it can help...

...but for those purists of use that want to use the core ModelAdmin...

...I'd love a good answer to this...

...please :)



16 September 2010 at 12:33pm Community Member, 178 Posts

I too would love to know how to handle this??


16 September 2010 at 7:42pm Forum Moderator, 1796 Posts

I now nod towards uploadify (uncle cheese module) for this...