Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » DataObject file upload gives not found

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 788 Views
  • priithansen
    Community Member
    25 Posts

    DataObject file upload gives not found Link to this post

    With SS3 RC1 and RC2 can't upload images for dataobjects.

    class MapsPage extends Page {
       static $has_many = array (
          'SmallMaps' => 'SmallMap'
       public function getCMSFields() {
          $fields = parent::getCMSFields();

          $gridField = new GridField("SmallMaps", "Maps list:", $this->SmallMaps(), GridFieldConfig_RelationEditor::create());
          $fields->addFieldToTab("Root.Maps", $gridField);
          return $fields;

    class SmallMap extends DataObject {
       public static $has_one = array(
          'MapThumbnail' => 'Image',
          'MapsPages' => 'MapsPage'

    When I select a SmallMap from MapsPage GridField and try to Upload a MapThumbnail Image from computer the UploadField shows a "not found" error.
    Adding a picture from already uploaded files works ok.

    The POST request that returns 404 is ss3/admin/pages/edit/EditForm/field/SmallMaps/item/9/ItemEditForm/field/MapThumbnail/upload

    Uploading from ModelAdmin for the same DataObject works just fine.

    Is there something missing from my code or could this be a bug?

  • shmayek
    Community Member
    3 Posts

    Re: DataObject file upload gives not found Link to this post

    Look at this thread http://www.silverstripe.org/general-questions/show/20011?start=0
    Definitely there is a problem with SS3.

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.