21282 Posts in 5730 Topics by 2601 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 484 Views |
-
DataObject file upload gives not found

27 June 2012 at 5:19am Last edited: 27 June 2012 5:22am
With SS3 RC1 and RC2 can't upload images for dataobjects.
<?php
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;
}
}<?php
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?
-
Re: DataObject file upload gives not found

27 June 2012 at 7:58pm
Look at this thread http://www.silverstripe.org/general-questions/show/20011?start=0
Definitely there is a problem with SS3.
| 484 Views | ||
|
Page:
1
|
Go to Top |

