Skip to main content

validate_image

Function validate_image 

Source
pub fn validate_image(data: &str, mime_type: &str) -> Result<(), String>
Expand description

Validate an image attachment before sending to the API.

ยงErrors

Returns a human-readable description of the first failure: unsupported MIME type or invalid base64.