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

How can i display uploaded file into anchor tag

Started by lrnzt 5 years ago · 1 replies · 440 views
5 years ago

Hi, i have a field to upload PDF, how can i display the path into a anchor tag for people to download the files?

YAML
        fields:
        header.fileList:
          name: lista
          type: list
          style: vertical
          label: Lista

          fields:
            .text:
              type: text
              label: File Name

            .arquivo:
              type: file
              label: Choose your PDF
              multiple: false
              destination: user/data/files/relatorios
              filesize: 5
              accept:
                - application/pdf
                - application/x-pdf
5 years ago

I think it was mentioned somewhere better not to use file upload fields in a list field. The way to go would be to use file as a normal field and in a list then use a filepicker

Someone please correct me if I'm wrong

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 3 weeks ago
1 268 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 196 3 weeks ago
General · by Jerry Hunt, 3 weeks ago
2 331 3 weeks ago
General · by pamtbaau, 3 weeks ago
1 253 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 225 3 weeks ago