The /sftp/store Robot

We export to the storage platform of your choice.

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

Parameters

Name Type Default Description
credentials (required) String 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 SFTP host, user, port and optional custom public key. 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", "port", "user", "public_key" (optional).
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.
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).

Live demos

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": {
    ":original": {
      "robot": "/upload/handle"
    },
    "resized": {
      "use": [":original"],
      "robot": "/image/resize",
      "result": true,
      "height": 500,
      "imagemagick_stack": "v1.0.0",
      "resize_strategy": "fit",
      "width": 500,
      "zoom": false
    },
    "watermarked": {
      "use": ["resized"],
      "robot": "/image/resize",
      "result": true,
      "format": "jpg",
      "imagemagick_stack": "v1.0.0",
      "watermark_position": "bottom-right",
      "watermark_size": "25%",
      "watermark_url": "http://demos.transloadit.com/inputs/transloadit-padded.png"
    },
    "exported": {
      "use": ["watermarked", ":original"],
      "robot": "/sftp/store",
      "credentials": "YOUR_CREDENTIALS",
      "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}"
    }
  }
}

Blog posts about our /sftp/store Robot

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.