Specify File Type for Comparison Manually
Leave feedback
On this page
GroupDocs.Comparison for Python via .NET detects file type from the extension by default. When the extension is missing, wrong, or ambiguous, set the file type explicitly via LoadOptions.file_type.
Files with no extension. Documents downloaded from S3 or content systems that strip extensions still need a file-type hint.
Wrong extension. Files renamed by content-management systems (e.g., .bin, .dat) that hold valid Word / PDF bytes.
Custom content-type detection. Pipelines where Python has already inspected the file (via python-magic or similar) and wants to bypass the library’s extension-based detection.