MCPcopy Create free account
hub / github.com/bytebase/bytebase / isBinaryContentType

Function isBinaryContentType

backend/api/mcp/tool_call.go:131–148  ·  view source on GitHub ↗
(ct string)

Source from the content-addressed store, hash-verified

129}
130
131func isBinaryContentType(ct string) bool {
132 ct = strings.ToLower(ct)
133 binaryPrefixes := []string{
134 "application/octet-stream",
135 "application/zip",
136 "application/pdf",
137 "application/gzip",
138 "image/",
139 "audio/",
140 "video/",
141 }
142 for _, prefix := range binaryPrefixes {
143 if strings.HasPrefix(ct, prefix) {
144 return true
145 }
146 }
147 return false
148}

Callers 1

handleCallAPIMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected