Jerome Ansia
Jerome Ansia

Reputation: 6884

gdata Zend PHP Google Docs Supported Filetypes

I heard like 10 months ago that Google was supporting all kind of files in Google Docs.

Proof in this video : http://youtu.be/Sp8fotnTwj8?t=4m20s

But i'm using the zend gdata function :

function uploadFile($fileLocation, $title=null, $mimeType=null,
                           $uri=null)

http://framework.zend.com/apidoc/1.10/_Gdata_Docs.html#Zend_Gdata_Docs::uploadFile()

And this function only accept certain kind of file described in this constant

private static $SUPPORTED_FILETYPES = array(
      'TXT'=>'text/plain',
      'CSV'=>'text/csv',
      'TSV'=>'text/tab-separated-values',
      'TAB'=>'text/tab-separated-values',
      'HTML'=>'text/html',
      'HTM'=>'text/html',
      'DOC'=>'application/msword',
      'ODS'=>'application/vnd.oasis.opendocument.spreadsheet',
      'ODT'=>'application/vnd.oasis.opendocument.text',
      'RTF'=>'application/rtf',
      'SXW'=>'application/vnd.sun.xml.writer',
      'XLS'=>'application/vnd.ms-excel',
      'XLSX'=>'application/vnd.ms-excel',
      'PPT'=>'application/vnd.ms-powerpoint',
      'PPS'=>'application/vnd.ms-powerpoint');

http://framework.zend.com/apidoc/1.10/_Gdata_Docs.html#Zend_Gdata_Docs::%24SUPPORTED_FILETYPES

So there is a bit of a contradiction there. My question is : Am i limited to only those kind of file or it is the gdata framework who hasn't be updated yet?

If yes how can i find a way around it?

(By the way, if Zend didn't make this update in 10 months i feel pretty bad for them, it's a major one and pretty easy to implement)

Thank you!

Upvotes: 1

Views: 306

Answers (1)

Claudio Cherubino
Claudio Cherubino

Reputation: 15004

The Documents List API supports any kind of files, it is the PHP library to be outdated. You can easily patch it and add other file types to $SUPPORTED_FILETYPES or let it ignore the check for the supported file types.

Upvotes: 1

Related Questions