Skip Navigation

[Resolved] Display a file upload in template as a link instead of a full URL

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by naderD 3 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1605937

Tell us what you are trying to do?
I have a file upload custom field that I want to display as a link (Download the file) instead of a full URL that points to the file
Is there any documentation that you are following?
I am following the default documentation on how to add custom fields to a template
Is there a similar example that we can see?
no
What is the link to your site?
hidden link

#1606101

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nader,

Thank you for getting in touch.

Can you let me know the exact code that you are using to display this file link ?

This way I can best advise on how to construct your link display.

Thanks,
Shane

#1606107

Hi Shane,
Thanks for your reply.
I am using the block editor in a content template to add the field to the front end page.
I have created several custom fields to the "Webinar" Post type. One of the fields is a file upload where I upload the pdf. However, I don't want the user to see the full URL of the file location. I know there are workarounds, but I want eventually to create front end forms to add the webinar listings, so I want the front end user to be able to upload their pdfs...etc..
The html code of the block is:

 <div class="tb-field tb-field--left" data-toolset-blocks-field="1">[types field='course-overview-document' output='normal'    ][/types]</div>

Thanks for your help.
Cheers,
Nader

#1606131

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-04-29 at 2.32.29 PM.png

Hi Nader,

Thank you for the additional information.

If you are using the Single field Block then you should get this option when you setup the block to display the field. See Screenshot

From there you can specify what you want the file link name to be .

Just fill out the File Link Title section and this should resolve your issue.

Please let me know if this helps.

Thanks,
Shane

#1606141

Wow... I feel foolish 🙂 That was right there but had no idea where to look.
Thank you. Issue resolved.

#1606143

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.