# Restrict file types in file section?

**URL:** <https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591>\
**Category:** Questions\
**Tags:** v3\
**Created:** [March 29, 2019, 4:47pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591 "2019-03-29T16:47:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 4:47pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/1 "2019-03-29T16:47:08Z")

</div>

Hello all. So you can’t restrict file types when creating a files section. Right? I’m just pretending the file section is really the file field I always wanted, but it’s not quite.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 29, 2019, 4:52pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/2 "2019-03-29T16:52:18Z")

</div>

> [@thewebprojects](#):
>
> So you can’t restrict file types when creating a files section.

Yes, you can do that using a file blueprint with the [`accept`](https://getkirby.com/docs/reference/panel/blueprints/file#accept) property.

What did you want from the files field? Uploads for the files field are planned for the [next feature release](https://www.notion.so/getkirby/Kirby-3-Roadmap-a2e5ecc7cf7842208e6fcad30a6d0b92#04c252185f11480dbf37ae3fac08f6e0), it that’s what you’re missing right now.

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 5:04pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/3 "2019-03-29T17:04:42Z")

</div>

I see. Right. That makes sense.

And yes. I always wanted a files field that allows you to upload one or many files direct to it so that’ll be a most welcomed feature.

Thanks Sonja. Should I just start out my questions with “Hello Sonja” next time? 😄 You’re always quick to reply. It’s greatly appreciated and part of the value I see in Kirby.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 29, 2019, 5:07pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/4 "2019-03-29T17:07:22Z")

</div>

> [@thewebprojects](#):
>
> Thanks Sonja. Should I just start out my questions with “Hello Sonja” next time?

Oh no, please don’t! There’s a lot more to the community than me. And I’m not omniscient, anyway.

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 5:19pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/5 "2019-03-29T17:19:35Z")

</div>

No problem. Just give me your email address and I’ll send questions directly to you. I wouldn’t.

So bare with me a moment on this topic please… can I have 2 file sections on one page, one restricted to images, the other restricted to files? Guess not if both sections rely on the file blueprint. Or do I set that template option…

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 29, 2019, 5:23pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/6 "2019-03-29T17:23:07Z")

</div>

> [@thewebprojects](#):
>
> can I have 2 file sections on one page,

Yes, you can have as many files section as you want or as makes sense. If you assign a different file blueprint to each section, you can set different `accept` options for each section, e.g. one for images, one for PDFs etc.

In your template, you can then filter by these file blueprints to fetch only the files you need.

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 5:25pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/7 "2019-03-29T17:25:13Z")

</div>

And how do you set the file blueprint? Is that what the template option is for?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 29, 2019, 5:25pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/8 "2019-03-29T17:25:55Z")

</div>

> [@thewebprojects](#):
>
> Is that what the template option is for?

Yes, exactly. Note that files sections can only ever have one template assigned to them (as opposed to pages sections where you can have multiple templates).

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 5:27pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/9 "2019-03-29T17:27:37Z")

</div>

Gotcha, that’s not very clear in the docs, but it makes sense now that I know. Cool.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 29, 2019, 5:39pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/10 "2019-03-29T17:39:04Z")

</div>

> [@thewebprojects](#):
>
> that’s not very clear in the docs,

Where do you think should I add more information/restructure it to make this clearer?

The option as such is documented here: [Files section | Kirby CMS](https://getkirby.com/docs/reference/panel/sections/files#filtering-files)

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 5:43pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/11 "2019-03-29T17:43:27Z")

</div>

Actually that’s pretty clear. I tend to scan that table, [Section Properties](https://getkirby.com/docs/reference/panel/sections/files#section-properties) for these little bits.

It currently reads, “Filters all files by template and also sets the template, which will be used for all uploads”, I suppose it would clearer for me if it read, "Filters all files by template and also sets the **file blueprint** , which will be used for all uploads.

The talk of templates throws me off.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 29, 2019, 5:47pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/12 "2019-03-29T17:47:44Z")

</div>

> [@thewebprojects](#):
>
> Filters all files by template and also sets the **file blueprint**

Haha, yes, I understand. But then it should actually read " Filters all files by file blueprint and also sets the **file blueprint**.

And then the option should probably be called `blueprint` in the first place.

Same with pages, that problem already existed in Kirby 2.

Now you have to learn that in a Panel context a blueprint is the same as a template.

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [March 29, 2019, 5:53pm UTC](https://forum.getkirby.com/t/restrict-file-types-in-file-section/13591/13 "2019-03-29T17:53:07Z")

</div>

I agree.
