def get_content_type(filename): return mimetypes.guess_type(filename)[0] or "application/octet-stream"