Attachments: automatic MIME detection with Tika
Description
At the moment, the file uploading logic in TgFileProcessingBehavior relies on a web browser to determine a MIME type of the file being uploaded (file.type). This, however, has a limited scope of possible file formats.
In cases where no MIME time could be determined by the browser, Apache Tika should be used at the server side as a fallback to determine the MIME type instead of reporting a MIME error in FileProcessingResource.
Tika support a large and growing list of file formats, but it also supports a way to supply custom file formats. This ability needs to be experimented with as part of this issue.
References
https://www.digipres.org/formats/mime-types/ https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/6XGQklp3ZcBFqljLPjrnQ9.html
Expected outcome
More reliable and richer support for file formats.