Close the stream and finalize writing the blob to the object database.
The stream will be closed and freed.
the id of the new blob
the stream to close
0 or an error code