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.

General Questions /

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

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

DataObject file upload gives not found

Go to End

2 Posts   1354 Views


Community Member, 25 Posts

27 June 2012 at 5:19am

Edited: 27/06/2012 5:22am

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?


Community Member, 3 Posts

27 June 2012 at 7:58pm

Look at this thread
Definitely there is a problem with SS3.