pub async fn encode_file_base64(path: &Path) -> Result<String, MediaError>Expand description
Read a local file and encode it as a base64 data URL.
The MIME type is inferred from the file extension. Returns a string like “data:image/png;base64,…”.
pub async fn encode_file_base64(path: &Path) -> Result<String, MediaError>Read a local file and encode it as a base64 data URL.
The MIME type is inferred from the file extension. Returns a string like “data:image/png;base64,…”.