File upload basics

I just spent 3 hours trying to figure out some of the most basic things in Grav and the documentation hasn’t helped much.

How exactly do I set up a file upload field for a page?
This link here says to create some yaml files but it doesn’t say in which folder to put them in or how to name them
https://learn.getgrav.org/forms/blueprints/how-to-add-file-upload

It also says that I can’t use the file upload field on a page and that I should use pagemediaselect…but when I add that I can’t upload files directly in the page anymore

All I need is to have one file upload form for one page and remove the default text box because it won’t be used. Why is this so complicated to set up. I’d gladly modify the default blueprint file because I’ll be making custom ones for each page but I can’t figure out where it is located. I don’t want to use it but it’s the only one that has a working file upload form. All I want is example code to set up a mini gallery section that will just have 5-10 photos on a modular page

From the Documentation:

In your theme, add a blueprints/ folder and add a YAML file with the name of the page template you added. For example if you add a blog page template. add a blueprints/blog.yaml file. You can find an example of this directory in the Antimatter theme.

With Grav 1.1 you are able to use the file field too.

I suggest you extend default to have the normal page options available, but if you want to remove some fields, you can do it with unset@, like in this example page blueprint with a file upload field:

title: Test
'@extends':
    type: default
    context: blueprints://pages

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        content:
          type: tab
          unset@: true 
        test:
          type: tab
          title: Test
          ordering@: -2
          
          fields:
            header.a_file:
              type: file
              label: A Label
              destination: '@self'
              accept:
                - image/*

@flavio I’m having the same issue - I tried your blueprint but I have the following error: Whoops \ Exception \ ErrorException (E_ERROR)
Maximum function nesting level of '100' reached, aborting!

Thanks

Looks like an error that you get if you extend default from a theme’s default.yaml (extending itself, basically).