Hello Uncle cheese
Sorry for the previous post
I got it almost to work.
When I create a work :
I got to tabs
Main where I can putthe 'name' and define categorie attached to the work
Files where I can upload files
When I add (save) the work I get to see a third tab wich seems normal according to :
new MultipleFileUploadField('UploadedFiles','Files'));
But I'm left with a problem
There is no thumbnail when I save the uploaded file
also There is nothing in the UploadedFiles tab.
<?php
class Work extends DataObject {
static $db = array(
'Name' => 'Varchar'
);
static $has_one = array(
'Category' => 'Category'
);
static $has_many = array (
'UploadedFiles' => 'WorkFile'
);
static $searchable_fields = array(
'Name'
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Files", new MultipleFileUploadField('UploadedFiles','Files');
return $fields;
}
}
I'm gonna try to find out by myself but if you have any idea
Thanks