> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Format to binary data

> Converts the context data into binary data.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Takes a single value from your data and outputs it as-is, with the option to first decode it from Base64. Use this when a value already holds the exact content you want to send out, such as the raw text of a file or a file that arrived Base64-encoded and needs decoding back to its original bytes before it is written or uploaded.

This documentation describes: [Schema](/schemas/serializer/binary)

## Fields

<FormField property="processor" label="Process data">
  Whether to decode the value before outputting it:

  * **None** outputs the value exactly as it is. This is the default.
  * **Decode Base64** treats the value as Base64-encoded text and converts it back to its original content, which is the usual choice for files received as Base64.
</FormField>

<FormField property="pattern" label="Path to data">
  Which value to take, given as a path within the item. For example `file` reads the `file` field. Leave it empty to read a field named `data`.
</FormField>

## Sample data

| Field        | Value         |
| ------------ | ------------- |
| Process data | Decode Base64 |
| Path to data | `file`        |

Input (the `file` field holds Base64-encoded text):

```json theme={null}
{ "file": "SGVsbG8sIEFsdW1pbyE=" }
```

Output (the decoded content):

```json theme={null}
"Hello, Alumio!"
```

With **Process data** set to **None**, the same value would be returned unchanged, exactly as it appears in the field.

```json Configuration theme={null}
{
  "prototype": "binary",
  "parameters": {
    "processor": "base64",
    "pattern": "file"
  }
}
```
