/file/filter issues on templates

Archived from the Transloadit support forum. Originally posted on November 13, 2013; details may be outdated, see our docs for current behavior. Original thread

I am having an issue with the /file/filter robot.

Here is what I have setup

"steps": {
"IsAudio": {
"robot": "/file/filter",
"accepts": [
[
"${file.mime}",
"regex",
"audio"
]
],
"error_on_decline": "true",
"error_msg": "NOT_VALID_FILETYPE"
},
"ExceedMaxFileSize": {
"use": ":original",
"robot": "/file/filter",
"accepts": [
[
"${file.size}",
"<",
"31457280"
]
],
"error_on_decline": "true",
"error_msg": "FILE_TOO_LARGE"
},
...}

also on the jQuery Plugin I have wait set to False.
I have the notify_url set to hit my API when the call back is complete.

Description of Problem:
On this template the user will upload a photo to this template (notice that its for audio files) and the file will get accepted on the initial response but rejected on the backend (due to the invalid file type).

While this works most of the time (the response returns an error) sometimes it does not.

My goal is to setup the system so that a user when uploading a file (that somehow gets past the UI level validation) will get a reject message each and everytime they upload a file that fails the file/filter but not have to wait for the entire process to complete.

Thanks for your help in advance.

Kenneth Garza

Hey Kenneth,

Do you have an assembly id so that I can see the file that made it through the filter robot.

Kind regards,

Tim Koschuetzki
Co-Founder Transloadit
@tim_kos