MCPcopy Create free account
hub / github.com/coder/coder / IsAllowedStoredMediaType

Function IsAllowedStoredMediaType

coderd/x/chatfiles/mime.go:72–75  ·  view source on GitHub ↗

IsAllowedStoredMediaType reports whether the media type is supported for durable chat file storage.

(mediaType string)

Source from the content-addressed store, hash-verified

70// IsAllowedStoredMediaType reports whether the media type is supported for
71// durable chat file storage.
72func IsAllowedStoredMediaType(mediaType string) bool {
73 _, ok := allowedStoredMediaTypes[BaseMediaType(mediaType)]
74 return ok
75}
76
77// IsInlineRenderableStoredMediaType reports whether a stored chat file may be
78// served with Content-Disposition: inline. PDFs remain storable but

Callers 4

postChatFileMethod · 0.92
PrepareStoredFileFunction · 0.85

Calls 1

BaseMediaTypeFunction · 0.85

Tested by 1