> 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.ftp.DownloadFile

- Component: `appmixer.utils.ftp.DownloadFile`
- Kind: Action
- Version: 1.2.0
- Visibility: Public
- Connector: [appmixer.utils.ftp 1.4.2](https://connectors.appmixer.com/connector/appmixer.utils.ftp/1.4.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.ftp/1.4.2/component/appmixer.utils.ftp.DownloadFile>

Download file from a remote FTP or SFTP server.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Path (`path`) | text | Remote file path. E.g. "/tmp/myfile.txt". |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`fileId`) | string | - |
| Filename (`filename`) | string | - |
| MD5 (`md5`) | string | - |
| Length (`length`) | integer | - |

### Port `notFound`

| Field | Type | Description |
| --- | --- | --- |
| Path (`path`) | string | - |
| Error Code (`errorCode`) | integer | - |
| Error Message (`errorMessage`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.ftp.DownloadFile",
  "author": "David Durman <david@client.io>",
  "description": "Download file from a remote FTP or SFTP server.",
  "auth": {
    "service": "appmixer:utils:ftp"
  },
  "version": "1.2.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ]
      },
      "inspector": {
        "inputs": {
          "path": {
            "type": "text",
            "label": "Path",
            "index": 1,
            "tooltip": "Remote file path. E.g. \"/tmp/myfile.txt\"."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "File ID",
          "value": "fileId",
          "schema": {
            "type": "string",
            "example": "a1686006-35c8-4ffc-b23e-d687858cd418"
          }
        },
        {
          "label": "Filename",
          "value": "filename",
          "schema": {
            "type": "string",
            "example": "invoice-1001.pdf"
          }
        },
        {
          "label": "MD5",
          "value": "md5",
          "schema": {
            "type": "string",
            "example": "9e107d9d372bb6826bd81d3542a419d6"
          }
        },
        {
          "label": "Length",
          "value": "length",
          "schema": {
            "type": "integer",
            "example": 20480
          }
        }
      ]
    },
    {
      "name": "notFound",
      "options": [
        {
          "label": "Path",
          "value": "path",
          "schema": {
            "type": "string",
            "example": "/uploads/invoice-1001.pdf"
          }
        },
        {
          "label": "Error Code",
          "value": "errorCode",
          "schema": {
            "type": "integer",
            "example": 550
          }
        },
        {
          "label": "Error Message",
          "value": "errorMessage",
          "schema": {
            "type": "string",
            "example": "File not found, or you don't have permissions to access it."
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
