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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

How can i display uploaded file into anchor tag

Started by lrnzt 5 years ago · 1 replies · 396 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 Jerry Hunt, 4 days ago
2 85 12 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago