Zend gdata Framework Google Docs - Outdated filetypes Need a fix

Question!

This framework is outdated and doesn't support all kind of files to upload, so i decided to fix the framework.

In the class Zend_Gdata_Docs

I did this by adding the entry JPG/JPEG/PPTX

private static $SUPPORTED_FILETYPES = array(
      'JPG'=>'image/jpeg',
      'JPEG'=>'image/jpeg',
      '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',
      'PPTX'=>'application/vnd.ms-powerpoint',
      'PPS'=>'application/vnd.ms-powerpoint');

It's working fine for the .pptx and for the jpeg/jpg the upload is working completely fine but once in Google Docs it is showing like a doc...

There:

Imge Google Docs



Answers

Your images are being converted into the Google Docs native format, to upload them as files, you have to append ?convert=false to the upload uri:

https://developers.google.com/google-apps/documents-list/#creating_or_uploading_drawings



This video can help you solving your question :)
By: admin