I'm trying to upload a simple csv document to google docs using zend gdata library but somehow it gets stuck.
I've looked all files used for upload and found where it gets stuck:
On line: 229 of Zend/Gdata/Docs.php after: $fs = $this->newMediaFileSource($fileLocation);
I couldn't find that newMediaFileSource() function even though I've looked at every-single file. Anyone has an idea on how can I resolve this?
public function uploadFile($fileLocation, $title=NULL, $mimeType=NULL, $uri=NULL)
{
// Set the URI to which the file will be uploaded.
if ($uri === NULL) {
$uri = $this->_defaultPostUri;
}
// Right after this line it stops executing:
$fs = $this->newMediaFileSource($fileLocation);
if ($title !== NULL) {
$slugHeader = $title;
} else {
$slugHeader = $fileLocation;
}
I have a similar problem to you. I couldn't find the function either so i suspected it's using a magic php call and sure enough in Zend_Gdata_App round line 1041:
its basically parsing the method name to check if there are any packages after "new"
its basically creating an object of type Zend_Gdata_App_MediaFileSource