ConnectorTriggerPayload.TryReadBinaryContent(String, Byte[]) Method

Definition

Attempts to read a binary-content trigger callback (for example OneDrive OnNewFileV2), whose wire shape is {"body":"<base64>"}, into the decoded file bytes.

public static bool TryReadBinaryContent(string json, out byte[] content);
static member TryReadBinaryContent : string * Byte[] -> bool
Public Shared Function TryReadBinaryContent (json As String, ByRef content As Byte()) As Boolean

Parameters

json
String

The raw JSON callback body.

content
Byte[]

When this method returns true, the decoded file bytes (empty when the body string was empty). When it returns false, an empty array.

Returns

true when the callback carried a base64 string body and was decoded; false when json was not valid JSON, the body was not a JSON string (for example a metadata callback), or the string was not valid base64.

Exceptions

json is null.

Applies to