Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

How can i display uploaded file into anchor tag

Started by lrnzt 5 years ago · 1 replies · 606 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 Andy Miller, 3 days ago
0 66 3 days ago
General · by lynbor, 4 weeks ago
3 409 1 week ago
General · by lynbor, 2 weeks ago
7 520 1 week ago
General · by Harry, 2 weeks ago
0 142 2 weeks ago
General · by Old Man Umby, 4 weeks ago
2 289 3 weeks ago