# auto choose template via rule sets

**URL:** <https://community.transloadit.com/t/auto-choose-template-via-rule-sets/17883>\
**Category:** Transloadit\
**Tags:** tender-archive\
**Created:** [March 10, 2011, 10:23pm UTC](https://community.transloadit.com/t/auto-choose-template-via-rule-sets/17883 "2011-03-10T22:23:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanderpick](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/sanderpick/32/1508_2.png) [@sanderpick](https://community.transloadit.com/u/sanderpick)\
**Post date:** [March 10, 2011, 10:23pm UTC](https://community.transloadit.com/t/auto-choose-template-via-rule-sets/17883/1 "2011-03-10T22:23:00Z")

</div>

> Archived from the Transloadit support forum. Originally posted on March 10, 2011; details may be outdated, see [our docs](https://transloadit.com/docs/) for current behavior. [Original thread](https://web.archive.org/web/20110513095851/http://support.transloadit.com/discussions/suggestions/32-auto-choose-template-via-rule-sets)

It would be great if I could specify a set of rules (similar to configuring templates) that can be passed to an assembly with a ‘rule\_id’. This would replace the ‘template\_id’. On your servers, you parse the instructions and choose the appropriate template. For example…

```auto
{
  "type": {
      "image": "template_id"
    , "video": "template_id"
  }
}

```

This would be very helpful for my current situation. I would like the user to be able to upload any kind of file from the same form, but different types get processed differently. I can do a superficial file type check client-side, but that’s bogus. Otherwise I can move everything server side and do the type checking there, then use curl to talk to [transloadit.com](http://transloadit.com)… but that means two file uploads instead of one.

Of course, I can just flip the file input field based on a radio input for upload type… but it would be slick if that was not needed 🙂

Just a thought. I think there would be other more complex use cases as well, beyond file types. Combing rules, etc…

Thanks and Best,  
Sander

---

<div class="post-metadata">

**Author:** ![sanderpick](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/sanderpick/32/1508_2.png) [@sanderpick](https://community.transloadit.com/u/sanderpick)\
**Post date:** [March 11, 2011, 1:44am UTC](https://community.transloadit.com/t/auto-choose-template-via-rule-sets/17883/2 "2011-03-11T01:44:00Z")

</div>

Never mind! Just came across this:

[http://transloadit.com/demos/advanced/processing-multiple-file-types](http://transloadit.com/demos/advanced/processing-multiple-file-types)

Sorry. I should have know you guys already thought of that ☹

---

<div class="post-metadata">

**Author:** ![Felix\_Geisendorfer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/felix_geisendorfer/32/1463_2.png) [@Felix\_Geisendorfer](https://community.transloadit.com/u/Felix_Geisendorfer)\
**Post date:** [March 11, 2011, 8:55am UTC](https://community.transloadit.com/t/auto-choose-template-via-rule-sets/17883/3 "2011-03-11T08:55:00Z")

</div>

No worries, let me know if we can help with anything else : )

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/transloadit/original/1X/04ee57da0cb7ac8728a9ac5965c288164f4ce280.svg) [@system](https://community.transloadit.com/u/system)\
**Post date:** [October 7, 2026, 9:18am UTC](https://community.transloadit.com/t/auto-choose-template-via-rule-sets/17883/4 "2026-10-07T09:18:06Z")

</div>


