tg icon indicating copy to clipboard operation
tg copied to clipboard

Attachments: automatic MIME detection with Tika

Open 01es opened this issue 2 years ago • 0 comments

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.

01es avatar Dec 18 '23 04:12 01es