MCPcopy Index your code
hub / github.com/docker/docker-agent / IsImageFile

Function IsImageFile

pkg/chat/chat.go:230–232  ·  view source on GitHub ↗

IsImageFile returns true if the file at the given path is a supported image based on its extension. Supported formats: JPEG, PNG, GIF, WebP.

(filePath string)

Source from the content-addressed store, hash-verified

228// IsImageFile returns true if the file at the given path is a supported image
229// based on its extension. Supported formats: JPEG, PNG, GIF, WebP.
230func IsImageFile(filePath string) bool {
231 return IsImageMimeType(DetectMimeType(filePath))
232}
233
234// IsSupportedMimeType returns true if the MIME type is supported for file attachments.
235// Supported types include images (jpeg, png, gif, webp) and documents (pdf, text, markdown).

Callers 1

handleReadFileMethod · 0.92

Calls 2

IsImageMimeTypeFunction · 0.85
DetectMimeTypeFunction · 0.85

Tested by

no test coverage detected