I'm using DOM's all over my site and it is working for files, images, audio etc..
Now i want to use it for video's. Grabbed the code from the example topic:
class VideoPage extends Page
static $has_many = array (
'Videos' => 'Video'
public function getCMSFields()
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Videos2", new FileDataObjectManager(
array('Title' => 'Title', 'Description' => 'Description'),
class VideoPage_Controller extends Page_Controller
class Video extends DataObject
static $db = array (
'Title' => 'Varchar(100)',
'Description' => 'Text'
static $has_one = array (
// Make sure this comes first
'VideoPage' => 'VideoPage',
* This relationship could be as simple as 'Video' => 'File' provided
* FileDataObjectManager::$upgrade_video is true (defaults to true).
* However, if we know the page will only contain videos, we can simplify things by
* using a direct relationship to FLV. This will give us the benefit of not having
* to worry about the allowed_file_types setting.
* To make this an audio resource, set the relationship to the MP3 class, e.g.
* 'AudioFile' => 'MP3'. Audio files are also subject to automatic upgrades, however,
* based on FileDataObjectManager::$upgrade_audio. (true by default).
'Video' => 'FLV'
Now, i've uploaded my files movie.mov & movie.flv to the assets folder via FTP. Went to the sync (dev/tasks) and synced it..
I go to VideoPage, tab Video2, upload, choose existing file, selected the movie.flv.. clicked save..
it loads.. you see the square appear, but no icon is in it!
When i Check Firebug, it says:
"NetworkError: 404 Not Found - http://www.mydomain.com/1137"
What is wrong here?
Why isn't it finding my file? They are truely there, i can go the the direct link and download them.
It is shared hosting, the server is running on windows i believe. Through the admin panel I've set-up the 'rights' on all assets- and sub folders.