Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » manage files/images in model admin

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

Page: 1
Go to End
Author Topic: 1530 Views
  • spierala
    Avatar
    Community Member
    80 Posts

    manage files/images in model admin Link to this post

    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,
    florian

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: manage files/images in model admin Link to this post

    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

    Barry

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: manage files/images in model admin Link to this post

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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: manage files/images in model admin Link to this post

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

    1530 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.