Joel Liu's personal annotations on this page
-
- The document's metadata
- The document's contents
- Both metadata and contents at once (using a MIME multipart request)
To update an existing document, first you retrieve the document you want to update, then you modify it as desired, and then you send a
PUTrequest to either theeditlink or theedit-medialink, depending on what is to be updated.
You can update any of the following:
-
The new document contents, which form part of the MIME multipart request, must have a content-type for which conversion is supported--for instance, to update a Google Docs document with new content, it could have content-type
application/msword, or content-typetext/plain, but not content-typeapplication/vnd.ms-excel. When updating a Google Docs spreadsheet, however, content-typeapplication/vnd.ms-excelwould be appropriate. Content-types which are not supported by the document type being updated will result in an HTTP 400Bad Requestresponse. -
For word documents, you can append data to the document's content by using the
append=trueparameter.
The process is exactly the same as updating a document's content above. Here is an example of appending
the textAppending this data!to a document. -
PUT /feeds/media/private/full/document%3Adocument_id?append=true
Host: docs.google.com
Authorization: <your authorization header here>
Content-Length: 20
Content-Type: text/plain
Appending this data!
This link has been bookmarked by 2 people . It was first bookmarked on 05 Jul 2009, by Joel Liu.
-
-
- The document's metadata
- The document's contents
- Both metadata and contents at once (using a MIME multipart request)
To update an existing document, first you retrieve the document you want to update, then you modify it as desired, and then you send a
PUTrequest to either theeditlink or theedit-medialink, depending on what is to be updated.
You can update any of the following:
-
The new document contents, which form part of the MIME multipart request, must have a content-type for which conversion is supported--for instance, to update a Google Docs document with new content, it could have content-type
application/msword, or content-typetext/plain, but not content-typeapplication/vnd.ms-excel. When updating a Google Docs spreadsheet, however, content-typeapplication/vnd.ms-excelwould be appropriate. Content-types which are not supported by the document type being updated will result in an HTTP 400Bad Requestresponse. - 2 more annotations...
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.