« Back to demos index

Only accept videos and images, and ignore all other file types

The /file/filter robot allows you to accept only images and videos and display an error to the user if any other file type was chosen. To run this demo, select a file that is neither an image nor a video and press the "Upload" button. » See full documentation

"steps": {
  "files": {
    "robot": "/file/filter",
    "accepts": [
      ["${file.mime}", "regex", "image"],
      ["${file.mime}", "regex", "video"]
    ],
    "result": true
  }
}
$(function() {
  $('form').transloadit({
    wait: true,
    autoSubmit: true
  });
});

The form

For demos we allow a maximum of 30MB.

This form is html5-multiupload enabled. If your browser supports it, you can select multiple files and execute the template with them.