Documentation
¶
Overview ¶
Package mimetab is the platform's pinned extension → MIME table — the one source both writers of the files registry consult, so the same filename yields the same registry row wherever it enters: the outputs harvest (internal/executor, #264) and the upload endpoint's extension fallback (internal/api, #277). Neither may consult mime.TypeByExtension: it merges the host's /etc/mime.types (or registry), so a host-dependent lookup would let the serving host decide a wire-visible value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByPath ¶
ByPath returns the pinned MIME type for the path's extension, case-folded, or application/octet-stream when the extension is unlisted. path.Ext (not filepath.Ext) on purpose: every caller hands it a slash-separated sandbox path or a validated bare filename, never a host-native path.
func ExtFor ¶ added in v0.5.0
ExtFor returns the extension the table pairs with a MIME type, ignoring its case and parameters, or "" when the type is unlisted. It names an upload that arrived without a filename (internal/api), and ByPath of the name it gives is the same bare type, carrying the table's parameters rather than the caller's ("text/plain" comes back "text/plain; charset=utf-8").
Types ¶
This section is empty.