private function fileCollectionInsert()
{
if ($this->isClosed) {
// TODO: Should this be an error condition? e.g. BadMethodCallException
return;
}
$md5 = hash_final($this->ctx);
$this->file['length'] = $this->length;
$this->file['md5'] = $md5;
$this->collectionWrapper->insertFile($this->file);
return $this->file['_id'];
}