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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

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

manage files/images in model admin

Go to End

4 Posts   2075 Views


Community Member, 80 Posts

24 July 2010 at 2:34am

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,


Forum Moderator, 1899 Posts

24 July 2010 at 3:01am

Edited: 25/07/2010 6:31am

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 :)



Community Member, 178 Posts

16 September 2010 at 12:33pm

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


Forum Moderator, 1899 Posts

16 September 2010 at 7:42pm

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