Commits

Christoph Mewes committed b9bc042

added option ot give the mime type

Comments (0)

Files changed (1)

 		return $api;
 	}
 
-	public function upload($file, $title, $description, $category, $tags = '', $slug = null) {
+	public function upload($file, $title, $description, $category, $tags = '', $mime = null, $slug = null) {
 		set_time_limit(0);
 
 		$api   = $this->getAPI();
 
 		// create a new Zend_Gdata_App_MediaFileSource object
 		$filesource = $api->newMediaFileSource($file);
-		$filesource->setContentType(sly_Util_Mime::getType($file));
+		$filesource->setContentType($mime === null ? sly_Util_Mime::getType($file) : $mime);
 		$filesource->setSlug($slug === null ? basename($file) : $slug);
 
 		// add the filesource to the video entry