The /file/filter Robot

We let you reject, or direct files against different encoding Steps.

The /file/filter Robot is a gatekeeper that can direct files to different encoding Steps based on your conditions.

Parameters

Name Type Default Description
accepts Array of Arrays [] Files that match at least one requirement will be accepted, or declined otherwise. Example:
[['${file.mime}', '==', 'image/gif']].
If the condition_type parameter is set to "and ", then all requirements must match for the file to be accepted.
declines Array of Arrays [] Files that match at least one requirement will be declined, or accepted otherwise. Example:
[['${file.size}','>','1024']].
If the condition_type parameter is set to "and ", then all requirements must match for the file to be declined.
condition_type String "or" Specifies the condition type according to which the members of the accepts or declines arrays should be evaluated. Can be "or" or "and".
error_on_decline Boolean false If this is set to true and one or more files are declined, the Assembly will be stopped and marked with an error.
error_msg String "One of your files was declined" This is the error message shown to your users (such as by Uppy) when a file is declined and error_on_decline is set to true.

Demos

Our /file/filter Robot can be used in combination with other Robots, to create powerful workflows unique to your use case. Here are a few example scenarios that you can try live on our website:

Blog posts about our /file/filter Robot

We wrote the following posts about our /file/filter 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.