c2pa-rs
c2pa-rs copied to clipboard
Add file mimetype detection to core Rust SDK
Mimetype detection is more an art than a science, as it involves guessing the correct mimetype for a file.
Some languages (like Python) attempt to guess the mimetype for files by looking at the filepath extension, but this can fail in two ways:
- when there is no extension
- when the extension lookup matches the wrong type (eg. https://github.com/contentauth/c2pa-python/pull/151)
The ask would be to move down that detection to the Rust SDK, to ensure all bound languages (eg. C++/Python) use at least the same logic, and not language-specific logics/adaptations.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/CAI-10466 is successfully created for this GitHub issue.