Tika icon

Tika

Extract text, metadata, and detect document types using Apache Tika

Detect MIME Type

AI-generated

Summary

Detect the MIME type of a file supplied as binary data in a workflow item.

Inputs

  • Binary Property (required) — Name of the binary property containing the file to process.
  • Options — Additional settings including Content Type Override (to specify the MIME type header sent to Tika), OCR Language (for OCR processing), OCR Strategy (handling of PDFs with text/images), and Password (for encrypted documents).

Output shape

a single JSON object with a 'mimeType' field containing the detected MIME type as a trimmed string, along with the original binary data preserved from the input item.

The operation sends the binary data to the Apache Tika server's /detect/stream endpoint via a PUT request. If an options.contentType is specified, it overrides the Content-Type header; otherwise, the MIME type is inferred. The response is plain text with the detected MIME type. Errors during processing can be caught and optionally passed on depending on the node's 'continue on fail' setting.

Examples

Example 1: Detect MIME type of a PDF file stored in the binary property 'data', with default settings.

Set the operation to 'Detect MIME Type', use 'data' as the binary property, and leave all options empty or default.

Links

Discussion