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 · 589 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 lynbor, 3 weeks ago
3 352 3 days ago
General · by lynbor, 1 week ago
7 387 3 days ago
General · by Harry, 3 days ago
0 83 3 days ago
General · by Old Man Umby, 3 weeks ago
2 256 2 weeks ago
General · by jeremycherfas, 3 weeks ago
5 374 2 weeks ago