0

How to attach a document/file to a category or folder using Zend gdata (oauth) in Google Docs ?

Thank you!

Jerome Ansia
  • 6,854
  • 11
  • 53
  • 99

1 Answers1

1

You can use Zend_Gdata_Docs::insertDocument() to add a resource to a collection/folder. See also the Google Documents List API: https://developers.google.com/google-apps/documents-list/#adding_a_resource_to_a_collection

diewie
  • 754
  • 4
  • 8
  • Thank you, yes i already spend too much time on this documentation but no example written in PHP that's a bit hard :/ I'm gonna try that ;) – Jerome Ansia Apr 24 '12 at 14:59
  • Do you mind just editing you answer with an example because i got the header of the function: $docs->insertDocument($data, $uri); What do i use for $data and $uri, (i'm really sorry i'm completely lost) – Jerome Ansia Apr 24 '12 at 15:05
  • 1
    I can show you how to use it. Please, just edit your question with the code where you determine your destination folder and where you have a reference to the resource/document/folder you want to add to this collection. – diewie Apr 24 '12 at 15:21
  • ok i think i've got it thanks for your answer, i don't know why i was thinking that learning the Google Docs API will be quick and easy and not so much in fact. Thank you ;) – Jerome Ansia Apr 24 '12 at 15:58
  • Ok i'm still a bit stuck for the $uri, i did a new question for this http://stackoverflow.com/questions/10302008/zend-gdata-php-adding-an-entry-to-a-collection – Jerome Ansia Apr 24 '12 at 16:29
  • Can you share with us how this was actually done? the answer really does not explain anything, not sure why it was made the accepted answer – Andre Jun 02 '12 at 02:16
  • Yeah can you please the solution? Thanks Jerome – Obaid Jul 07 '12 at 17:51