finish_upload
Description:
public DocumentsDocument finish_upload (UploadStream upload_stream) throws Error
Finish off a document upload or update operation started by upload_document or update_document, parsing the result and returning the new or updated DocumentsDocument.
If an error occurred during the upload or update operation, it will have been returned during the operation (e.g. by
splice or one of the other stream methods). In such a case,
null
will be returned but error
will remain unset. error
is only set in the case that the server indicates
that the operation was successful, but an error is encountered in parsing the result sent by the server.
In the case that no DocumentsDocument was passed (to
upload_document or
update_document) when starting the operation,
TYPE will be thrown in error
if the content type of
the uploaded data could not be mapped to a document type with which to interpret the response from the server.
Parameters:
this | |
upload_stream |
the UploadStream from the operation |
Returns:
the new or updated DocumentsDocument, or |