def __setitem__(self, key, value):
        content_type = None
        #if value and Magic:
        #    content_type = self._magic.from_buffer(value)
        spec = self._get_spec(filename=key, content_type=content_type)
        try:
            self.put(value, **spec)
        except __HOLE__:
            raise TypeError("GridFS value mus be string not %s" % type(value))
dataset/ETHPy150Open namlook/mongokit/mongokit/grid.py/FS.__setitem__