## The problem
Issue mindee/mindee-api-python#126 (closed, 3 comments): calling doc_from_bytes on a tempfile raised "Could not determine MIME type" because the stdlib mimetypes lookup keys off the file extension and temp files have none. The maintainer gave a workaround (give the temp file a .pdf suffix) and noted anonymous files with a valid PDF tag are still identified when using the fix_pdf input parameter.

## What fixed it
tempfile.NamedTemporaryFile has no extension, so the SDKs extension-based MIME sniffing fails with MimeTypeError. Two ways around it: give the temp file a name ending in .pdf before handing it to doc_from_bytes, since the server validates the real content anyway; or pass the fix_pdf parameter when creating the input so PDFs without a proper name are still identified.