3

I am trying to upload a file into a specific folder. I have the folder URI so I pass that as the URI in uploadFile function in Zend API.

However, I end up getting a 401 error.

This code works and uploads the file to the base of Google docs:

$newDocumentEntry = $docs->uploadFile($filePath, $documentTitle, null, Zend_Gdata_Docs::DOCUMENTS_LIST_FEED_URI);

how do I create a URI that uploads it to a specific folder?


I am really strugling with this issue. I have tried everything I can think of to create a valid URI for specific folder but I always get the following error msg:

Expected response code 200, got 400
Invalid request URI 

does anyone have any suggestions?

Obaid
  • 4,328
  • 9
  • 42
  • 42
  • If someone can show me how to do this via Zend GData library, I would really appreciate it. I am trying to create a new folder (let's call it XYZ) and then upload a document to this folder (not the root folder) – Obaid Jul 07 '12 at 17:37
  • Since no one has answered this, can I get my bounty back? :( – Obaid Jul 14 '12 at 03:39

1 Answers1

1

php zend gdata put a document/file into a category/folder Google Docs

Is this what you are looking for?

If the error is 401, check if the authenticated google user really have permission to the folder for writing.

Community
  • 1
  • 1
janenz00
  • 3,315
  • 5
  • 28
  • 37
  • 1
    The user is authenticated, i just can't figure out a way to give it the write path to the specific folder. It does upload to the root google docs folder but I can't find a way to upload it to a specific folder.. – Obaid Jul 07 '12 at 17:36