TTMSMCPResourceContent.FromBlob Method
Creates a content object holding binary data.
API unit family: TMS.MCP.Resources
Declaring type: TTMSMCPResourceContent
Syntax
class function FromBlob(const AURI, AMimeType, ABlob: string): TTMSMCPResourceContent; static;
Remarks
The data is not encoded here; pass it already encoded.
Parameters
| Name | Description |
|---|---|
AURI |
Address the content was read from. Must not be empty. |
AMimeType |
Media type of the data, for example image/png. May be left empty. |
ABlob |
The data, already Base64-encoded. Must not be empty. |
Returns
A new content object. The caller owns it, and a handler that returns it hands that ownership on.
Exceptions
| Exception | Description |
|---|---|
EJsonRpcException |
Raised with invalid-parameters, error code -32602, when the address or the data is empty. |