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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Video uploading Error

Go to End

5 Posts   824 Views


Community Member, 18 Posts

12 January 2012 at 7:43pm

Hi ,to all

Video uploading Error from admin side.......

when i try to upload an Video file from admin side, it shows an error.(test.flv (194.49KB) - HTTP Error)

[Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form. The file will not be sent. ]

what i do.. I have no idea....Pls help me.....?




Community Member, 96 Posts

12 January 2012 at 11:30pm


how did you upload the video? Did you use another module like Uploadify, of something?
It is also handy to post the code, so that everyone can see, what you´ve done.


Community Member, 18 Posts

13 January 2012 at 1:01am

Edited: 13/01/2012 1:06am

Hi, Bereusei

Currently i am working in windows server in IIS with sql server 2008 as database....
I checked FLV::echo_ffmpeg_test(); and the results shows
FFMPEG is installed on your server and working properly. Code: 1

Totally I am stuck with uploading and video thumbnail.

My code is=======>
1)Video .php
class Video extends DataObject
static $db = array ('Title' => 'Varchar(100)','Description' => 'Text');
static $has_one = array ('VideoPage1' => 'VideoPage','Video' => 'FLV');

class VideoPage extends SectionPage {

static $has_many = array ('Videos' => 'Video');
static $has_one = array ('Filepath' => 'Filename');

public static $icon = 'mysite/images/treeicons/video';

public static $db = array(

//public static $has_one = array();

public function canCreate($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) $member = Member::currentUser();

if($member && Permission::checkMember($member, "ADMIN")) return true;

// DEPRECATED 2.3: use canCreate() instead
$results = $this->extend('alternateCanCreate', $member);
if($results && is_array($results)) if(!min($results)) return false;

// decorated permission checks
$results = $this->extend('canCreate', $member);
if($results && is_array($results)) if(!min($results)) return false;

return $this->stat('can_create') != false || Director::isDev();

public function getCMSFields() {
$fields = parent::getCMSFields();

$fields->addFieldToTab("Root.Content.Videos", new FileDataObjectManager(
array('Title' => 'Title', 'Description' => 'Description'),
new FieldSet(
new TextField('Title'),
new TextareaField('Description')

return $fields;

function Thumbnail() {
$Image = $this->Image();
if ( $Image ) {
return $Image->CMSThumbnail();
} else {
return null;

class VideoPage_Controller extends SectionPage_Controller {

public static $allowed_actions = array (

public function init() {


<% if IncludeLeftPanel %>
<% include LeftPanel %>
<% end_if %>
<div id="Content" class="typography <% if IncludeLeftPanel %>wLeft<% end_if %><% if IncludeRightPanel %>wRight<% end_if %>">
<% if ClassName=="HomePage" %>
<% control sectionPages %>
<% if Children %>
<div class="$URLSegment contentBox sectionSummary round shadow">
<a href="$Link"><img class="icon" alt="$Title Icon" src='$icon.URL'/></a>
<div class="description">
<a href="$Link"><h3>$Tagline</h3></a>
<a href="$Link"><img class="headshot" alt="$Title Headshot" src='$headshot.URL'/></a>
<% end_if %>
<% end_control %>
<% end_if %>
<% if ComingSoon %>
<% include ComingSoon %>
<% else_if Content %>
<% if NoContentBox %>
<% else %>
<div id="ContentInner" class="round shadow">

<link rel="stylesheet" type="text/css" href="Player/style.css">
<!--<div id="mediaplayer">H2connect Video Player </div>-->
<video id="mediaplayer"></video>
<div align="center">
<script type="text/javascript" src="Player/jwplayer.js"></script>
<% control Videos %>
<li style="display:inline-block; *float:left;text-align:center;">

<div style="margin: 3px auto; width:70px;text-align:center;padding:10px; border:0px solid #f7f7f7;">

<% control Video %>
<div id="mediaplayer"></div>
<script type="text/javascript">
flashplayer: '/Player/player.swf',
file: '$FLVLink',
image: '$image'
<script type="text/javascript">
function Play(videoUrl)
var playlist = jwplayer('mediaplayer').getPlaylist();
var newItem = videoUrl;
<a href="#" onclick="Play('$FLVLink')">



<% end_control %>
<% end_control %>
<% if ClassName=="Page" %>
<% else_if Fields %>
<% end_if %>

<% if ClassName == RegistrationPage %>
<% if RegistrationForm %>
<% control RegistrationForm %><% include MultiFormProgressList %><% end_control %>
<% end_if %>
<% end_if %>

<% end_if %>
<% end_if %>
<% if IncludeRightPanel %>
<% include RightPanel %>
<% end_if %>
<% if IncludeOurPicks %>
<% include OurPicks %>
<% end_if %>

Here i am used uploadify for uploading files.

Pls find me a solution....




Community Member, 96 Posts

13 January 2012 at 1:17am

If you want to upload swf, you must have something like this in the getCMSFields-function (in your Page class): SWFUploadConfig::addFileType('swf');
Perhaps this is already the solution.

This link could be interesting for you as well:

Perhaps there is something you could use.


Community Member, 18 Posts

13 January 2012 at 1:37am


Can u explain briefly,because I am new to Silverstripe..

Actually i had uploaded video file with above listed codes.

The problem starts,
When I am trying to get the video thumbnail and made some changes in code,all the errors were occured.
Then i changed every thing but the error still appear.

Where I add "SWFUploadConfig::addFileType('swf'); " . What about swf.