> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.converters.DataUri2File

- Component: `appmixer.utils.converters.DataUri2File`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.converters 2.0.1](https://connectors.appmixer.com/connector/appmixer.utils.converters/2.0.1.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.converters/2.0.1/component/appmixer.utils.converters.DataUri2File>

Transform a Data URI to file.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Data URI (`dataUri`) | textarea | A [Data URI](https://en.wikipedia.org/wiki/Data_URI_scheme) representation of a file. |
| File Name (`fileName`) | text | Enter a file name. If you don't include a file extension, one will be automatically added based on the content type of the Data URI. If you leave the file name blank completely, the resulting file name will be 'result.[GUESSED_EXTENSION]'. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`fileId`) | string | - |
| File Name (`fileName`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.converters.DataUri2File",
  "author": "David Durman <david@client.io>",
  "description": "Transform a Data URI to file.",
  "private": false,
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "properties": {
          "dataUri": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          }
        },
        "required": [
          "dataUri"
        ]
      },
      "inspector": {
        "inputs": {
          "dataUri": {
            "type": "textarea",
            "label": "Data URI",
            "index": 1,
            "tooltip": "A <a target=_blank href=\"https://en.wikipedia.org/wiki/Data_URI_scheme\">Data URI</a> representation of a file."
          },
          "fileName": {
            "type": "text",
            "label": "File Name",
            "index": 2,
            "tooltip": "Enter a file name. If you don't include a file extension, one will be automatically added based on the content type of the Data URI. If you leave the file name blank completely, the resulting file name will be 'result.[GUESSED_EXTENSION]'."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "File ID",
          "value": "fileId",
          "schema": {
            "type": "string",
            "example": "a1686006-35c8-4ffc-b23e-d687858cd418"
          }
        },
        {
          "label": "File Name",
          "value": "fileName",
          "schema": {
            "type": "string",
            "example": "result.png"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
