Update the document using the properties from document
and the document data written to the resulting
UploadStream.
If the document data does not need to be changed, just the metadata, use update_entry instead.
Unlike update_document, this method performs a resumable upload which allows for correction of transmission errors without re-uploading the entire file. Use of this method is preferred over update_document.
The stream returned by this function should be written to using the standard OutputStream methods,
asynchronously or synchronously. Once the stream is closed (using close),
finish_upload should be called on it to parse and return the
updated DocumentsDocument for the document. This must be done, as document
isn't updated in-place.
In order to cancel the update, a Cancellable passed in to cancellable
must be cancelled using
cancel. Cancelling the individual OutputStream operations on the
UploadStream will not cancel the entire update; merely the write or close operation in
question. See the cancellable for more details.
Any upload errors will be thrown by the stream methods, and may come from the ServiceError domain.
For more information, see update_entry.
this | |
document |
the DocumentsDocument to update |
slug |
the filename to give to the uploaded document |
content_type |
the content type of the uploaded data |
content_length |
the size (in bytes) of the file being uploaded |
cancellable |
a Cancellable for the entire upload stream, or |
a UploadStream to write the document data to; unref with unref |