Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

How can i display uploaded file into anchor tag

Started by lrnzt 5 years ago · 1 replies · 554 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 jeremycherfas, 4 days ago
3 95 2 hours ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago