A frequently requested feature is to allow more flexibility when it comes to choosing how different upload files are processed.

At this point, our Robots are already smart enough to not touch files they don't know how to handle, so a video our Robots would silently ignore any image files. This makes it really easy to use the same Assembly for upload forms where the user is free to upload whatever media file they desire.

However, there are, of course, other conditions than file type that may lead to a different treatment of the file. As of today, we are adding the first new condition which allows you to execute a given Step based on the name of the form field with which the file was uploaded.

Usage is as simple as:

{
  steps: {
    encode: {
      robot: "/video/encode",
      use: {
        fields: ["raw_video"]
      }
    },
    store: {
      robot: "/s3/store",
      use: [":original", "encode"]
    }
  }
}

In this Assembly, a video would only be encoded if it was uploaded using the field name "raw_video". In any other case, the video will be taken as-is and directly uploaded to S3.

Going forward, we are planning to add more conditions that will also allow you to make your Steps choose their own input, using the incoming file's metadata.

P.S. We have also updated the documentation for this.