@defer.inlineCallbacks
    def __flush(self):
        yield self.__flush_buffer()

        md5 = yield self._coll.filemd5(self._id)

        self._file["md5"] = md5
        self._file["length"] = self._position
        self._file["uploadDate"] = datetime.datetime.utcnow()
        yield self._coll.files.insert(self._file)
Flush the file to the database.
dataset/ETHPy150Open twisted/txmongo/txmongo/_gridfs/grid_file.py/GridIn.__flush