1

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!

Rio
  • 14,182
  • 21
  • 67
  • 107

1 Answers1

0

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.

ByteNudger
  • 1,545
  • 5
  • 29
  • 37