Is there a way to POST a specific Content-type using Zend GData? Specifically I want to post a file with type
"Content-Type: application/vnd.youtube.timedtext; charset=UTF-8"
Otherwise, will I need to use cURL? Thanks!
Is there a way to POST a specific Content-type using Zend GData? Specifically I want to post a file with type
"Content-Type: application/vnd.youtube.timedtext; charset=UTF-8"
Otherwise, will I need to use cURL? Thanks!
You can set the specific content type of your file with setContentType()
with something like this:
$yt = new Zend_Gdata_YouTube($httpClient);
$filesource = $yt->newMediaFileSource('your_file.ext');
// content type you want to use
$filesource->setContentType('application/vnd.youtube.timedtext; charset=UTF-8');
There is good example with more options at Zend Framework: Documentation: Using the YouTube Data API - Zend Framework Manual : Uploading Videos to YouTube.