Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Error with multiple file field inside a list

Started by Muut Archive 9 years ago · 0 replies · 397 views
9 years ago

Hi!

I have this configuration for a multi file inside a list:

YAML
            header.imageslist:
              name: imagelist
              type: list
              style: vertical
              fields:
                .images:
                  type: file
                  style: vertical
                  destination: '@self/images'
                  multiple: true
                  accept:
                    - image/*
                  validate:
                    type: array
                .title:
                  type: text 
                  style: vertical
                  label: Title
              validate:
                type: array

When I fill it with images, I got this:

imageslist:

YAML
    title: 'Test'
    images:
        user/pages/01.Test/mars/images/mars.jpeg
            name: mars.jpeg
            type: image/jpeg
            size: 53984
            path: user/pages/01.Test/mars/images/mars.jpeg

But, when I re-save, I got:

imageslist:

YAML
    title: 'Behind the scenes'
    images:
        user/pages/01.Test/mars/images/mars.jpeg:
            - mars.jpeg
            - image/jpeg
            - '53984'
            - user/pages/01.Test/mars/images/mars.jpeg

So, I suppose there's something wrong with my markdown or it cannot be read... Help needed!!! :(

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1321 9 years ago
Archive · by Muut Archive, 9 years ago
2 916 9 years ago
Archive · by Muut Archive, 9 years ago
2 4047 9 years ago
Archive · by Muut Archive, 9 years ago
1 2921 9 years ago
Archive · by Muut Archive, 9 years ago
3 1105 9 years ago