Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Saving files with uploadfield into a child relation

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

Page: 1
Go to End
Author Topic: 301 Views
  • Bambii7
    Avatar
    Community Member
    254 Posts

    Saving files with uploadfield into a child relation Link to this post

    Hi guys,

    I'm wanting/wondering if I can use the upload field on a parent object to save into a child object's image relation.

    I have an ItemPage which has_many StoryItem which has_one Image
    There are a few optional fields in StoryItem, so for simplicty I would like the awesome upload field on the ItemPage to drag and drop into.

    I tried supplying Stories.Image as the $name when creating new UploadField(), no go though. Am I dreaming?

    Using gridfield is fine too, just not quite as fast.

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: Saving files with uploadfield into a child relation Link to this post

    I'm currently in the process of upgrading a site from 2.4 to 3 where I had a working solution. I'll keep you posted as I should be tackling that section this week

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Saving files with uploadfield into a child relation Link to this post

    ty zenmonkey, I'll here update if I get any closer to achieving this.

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