Archived from the Transloadit support forum. Originally posted on October 29, 2013; details may be outdated, see our docs for current behavior. Original thread
Hi all,
I created a simple filter to check file extension and give error if file extension is not accepted.
The problem is that tansload seem to ignore “error_msg” parameter because when i test template, i really get error box but with standard message and not my custom message of “error_msg”.
Is this a bug?
When i create a template with this sample code and try to test it on transloadit user-area, i get uploader standard error message when file is not “png” instead of “Only png files are permitted” message.
I think i found a strange behaviour with file/filter.
Eg, imagine i want to use swf files (note this is just an example) and make sure uploaded files must be flash.. so with a mimetype “application/x-shockwave-flash”.
The problem is that, if i use “==” i get a transloadit parse error “Transloadit was unable to parse your accepts or declines array”.