The /sftp/store Robot

Transloadit is happy to export to whatever storage solution suits you best.

The /sftp/store Robot exports encoding results to your own SFTP server.

Parameters

Name Type Default Description
user (required) String The username for the SFTP connection.
host (required) String The host with which to establish the SFTP connection.
path String "${unique_prefix}/${file.url_name}" The path at which the file is to be stored. This may include any available Assembly variables.
url_template String "http://host/path" The URL of the file in the result JSON. This may include any of the following supported Assembly variables.
ssl_url_template String "https://{HOST}/{PATH}" The SSL URL of the file in the result JSON. The following Assembly variables are supported.
port Integer 22 The port to be used for the SFTP connection.
file_chmod String Auto This optional parameter controls how an uploaded file's permission bits are set. You can use any string format that the chmod command would accept, such as "755". If you don't specify this option, the file's permission bits aren't changed at all, meaning it's up to your server's configuration (e.g. umask).

Example use cases

Our /sftp/store Robot can be used in combination with other Robots, to create powerful workflows unique to your use case.
Here are a few example scenarios, and the required the Assembly Instructions to implement them.
You can also try demos of these examples right here, live on our website.

Apply a watermark to an image and store everything over SFTP

{
  "steps": {
    "thumb": {
      "use": ":original",
      "robot": "/image/resize",
      "result": true,
      "width": 250,
      "height": 250,
      "resize_strategy": "pad",
      "format": "jpg",
      "watermark_url": "https://transloadit.com/assets/images/robots/170x170/video-encode.png",
      "watermark_size": "25%",
      "watermark_position": "bottom-right"
    },
    "store": {
      "use": [
        "thumb",
        ":original"
      ],
      "robot": "/sftp/store",
      "user": "not_our_correct_user",
      "host": "sftp-demo.transloadit.com",
      "path": "uploads/make/this/dir/if/you/!_like/${file.url_name}",
      "url_template": "http://sftp-demo.transloadit.com:81/make/this/dir/if/you/!_like/${file.url_name}"
    }
  }
}

Related blog posts

Over the years we wrote the following posts about Our /sftp/store robot on our blog:

Did you know?

You can easily combine Robots to create powerful workflows, unique to your business.
This is the power of Transloadit.