pub struct FileContent {
pub name: Option<String>,
pub mime_type: Option<String>,
pub bytes: Option<String>,
pub uri: Option<String>,
}Expand description
The content of a FilePart. Wire form:
{ "name"?: "...", "mimeType"?: "...", "bytes"?: "base64...", "uri"?: "..." }.
Fields§
§name: Option<String>An optional file name. The spec does not
require it; a part that is a
text/plain snippet with no name is
valid.
mime_type: Option<String>An optional MIME type. The spec recommends setting it; an agent that has to guess the type from a URI or a base64 prefix is doing more work than the wire form requires.
bytes: Option<String>The file’s bytes, base64-encoded. Set
when the file is small enough to fit in
the message; for larger files, set
uri instead and let the recipient
fetch it.
uri: Option<String>A URI the recipient can fetch the file from. The URI is the SSRF surface the A2A SSRF denylist filters on the server side; a client that sends a URI is trusting the server to either fetch it or refuse.