2009年11月9日星期一

[fw-gdata] 1.8.3 Warning: include(Zend\Gdata\Media\Extension\MediaFileSource.php)

<p>Hi.</p>
<p>I'm working on a project
with zf 1.8.3 and I get the error
in the subject (the script works with 1.9.*)</p>
<p>I should upload a file the code is quite the same</p>
<pre>
protected function _getFileSource(){
$ext= ltrim(strtolower(strrchr($this->fileToUpload,'.')),'.');
if($ext !== 'flv'){
throw new Exception('Invalid extension');
}
$filesource = $this->yt->newMediaFileSource($this->fileToUpload);
$filesource->setContentType('video/x-flv');
$filesource->setSlug($this->fileToUpload);
return $filesource;
}

protected function _uploadFile(){
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
/* ERROR */
$myVideoEntry->setMediaSource($this->_getFileSource());
}

<p>Both Zend_Gdata_YouTube and Zend_Gdata_ClientLogin works</p>
<p>What's the 1.8.3 way ?</p>

Thanks in advance.
Bye


--
View this message in context: http://old.nabble.com/1.8.3-Warning%3A-include%28Zend%5CGdata%5CMedia%5CExtension%5CMediaFileSource.php%29-tp26275101p26275101.html
Sent from the Zend gdata mailing list archive at Nabble.com.

没有评论: