MCPcopy Index your code
hub / github.com/coder/coder / BaseMediaType

Function BaseMediaType

coderd/x/chatfiles/mime.go:57–62  ·  view source on GitHub ↗

BaseMediaType strips parameters from a media type.

(mediaType string)

Source from the content-addressed store, hash-verified

55
56// BaseMediaType strips parameters from a media type.
57func BaseMediaType(mediaType string) string {
58 if parsed, _, err := mime.ParseMediaType(mediaType); err == nil {
59 return parsed
60 }
61 return mediaType
62}
63
64// AllowedStoredMediaTypesString returns the supported durable chat file media
65// types as a comma-separated list.

Callers 5

DetectMediaTypeFunction · 0.85
IsAllowedStoredMediaTypeFunction · 0.85
PrepareRecordingArtifactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected