file

Any file, such as an email attachment or an upload, with its name, type and size. What a file holds decides what it can be used as: one whose content is a PDF, a picture or a recording is accepted wherever that is expected.

At a glance

Writing

Written as

A JSON object.

Reading

Querying

The text of text files, office documents and PDFs is indexed in passages; an archive (zip or tar) is indexed by its list of entries, so a search finds a file in it by name. Files above a size limit are not indexed. See the HQL reference.

SupportTicket | attachments.file ~~ "refund policy" | select id, match.text | limit 10
Message | ~* "quarterly report" | match.dtype = "file" | select id, match.field, match.text | limit 20

content.dtype asks whether a message carries a generic file, without searching. On a list such as a message's content, size.bytes adds up every PDF, picture, recording and file in it:

Message | content.dtype = "file" AND content.size.bytes > 10000000 | select id, content.size.bytes

In agent tools

Metadata

Derived values kept with a stored value:

Operations

Through the dtypes resource: