Zend GData upload file into a specific folder

609 Views Asked by At

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?

1

There are 1 best solutions below

1
On

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.