@property
    def mimetype(self):
        if self.type is not None:
            return self.type.mimetype

        if self.file.name not in (None, ""):
            from wq.io.util import guess_type
            mimetype = guess_type(self.file.name, self.file.read(1024))
            return mimetype
        else:
            return None
dataset/ETHPy150Open wq/wq.db/patterns/file/models.py/File.mimetype/original