def file_format(self): ct = self.file.headers.get('Content-Type', 'unknown').lower() return KNOWN_DIF_FORMATS.get(ct, 'unknown')
def file_format(self): ct = self.file.headers.get("Content-Type", "unknown").lower() return KNOWN_DIF_FORMATS.get(ct, "unknown")