Flag of Ukraine
Our /ftp/import Robot

Import files from FTP servers

🤖/ftp/import imports whole libraries of files from your FTP servers into Transloadit. This Robot relies on password access. For more security, consider our /sftp/import Robot.

Usage example

Import files from the path/to/files directory and its subdirectories:

{
  "steps": {
    "imported": {
      "robot": "/ftp/import",
      "credentials": "YOUR_FTP_CREDENTIALS",
      "path": "path/to/files/"
    }
  }
}

Parameters

  • ignore_errors

    Array of Strings / Boolean ⋅ default: []

    Possible array members are "meta" and "import".

    You might see an error when trying to extract metadata from your imported files. This happens, for example, for files with a size of zero bytes. Including "meta" in the array will cause the Robot to not stop the import (and the entire Assembly) when that happens.

    Including "import" in the array will ensure the Robot does not cease to function on any import errors either.

    To keep backwards compatibility, setting this parameter to true will set it to ["meta", "import"] internally.

  • credentials

    Stringrequired

    Please create your associated Template Credentials in your Transloadit account and use the name of your Template Credentials as this parameter's value. They will contain the values for your FTP host, user and password.

    While we recommend to use Template Credentials at all times, some use cases demand dynamic credentials for which using Template Credentials with their static nature is too unwieldy. If you have this requirement, feel free to use the following parameters instead: "host", "user", "password".

  • path

    Stringrequired

    The path on your FTP server where to search for files. Files are imported recursively from all sub-directories and sub-sub-directories (and so on) from this path.

  • port

    Integer ⋅ default: 21

    The port to use for the FTP connection.

  • passive_mode

    Boolean ⋅ default: true

    Determines if passive mode should be used for the FTP connection.

Things to keep in mind

  • Your server might be unresponsive from time to time. Since (S)FTP servers are harder to scale, we see this happen a lot. As a result, if this Robot fails to store one of your files, it will retry to store the file 5 times over 15 minutes.
  • This also means that when you provided the wrong credentials (when testing for example) Assemblies can take up to 15 minutes to complete.
  • If an Assembly has an export Step and takes long to execute, it is almost always due to the export Step having wrong credentials or the server being unreachable.

We advise you to use 🤖/sftp/store and 🤖/sftp/import when possible, as it is much more secure. The FTP Robots should only serve as a fallback in case cloud storage or SFTP cannot be used.

Related blog posts