Skip Navigation

[Resolved] I uploaded file and I needed it display the image of it instead of the location

This support ticket is created 5 years, 6 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by acts-1224C 5 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1242628

I am trying to: display the files uploaded document as a image grid that belongs to any particular member account

Link to a page where the issue can be seen:

I expected to see: the image of the uploaded document or a display that says PDF with the document name

Instead, I got: the whole file location address.

Can I change that? it is the same scenario if I upload right now a file in the field below and you see the resemblance of the image I uploaded instead of the location of the file in your system.

#1242800

Hello,

I assume we are talking about a custom file field created with Types plugin.

If it is, there isn't such a built-in feature within Types plugin, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#file
No such an option to display as you request:
the image of the uploaded document or a display that says PDF with the document name

As a workaround, for example, if it is a single instance custom file field "my-pdf" for PDF files, you can setup the HTML links manually:

<a href='[types field="my-pdf" output="raw"][/types]'><img src="<em><u>hidden link</u></em>"></a>
#1243876

Thanks Luo, so that means that because the pdf is a generic image I can display it as a clickable link for the purpose of just to display any generic image instead of the address or path location of the location to the file right? did I understand it correctly? that image can be set to display over and over again for every document. That means I can create few main icons that may be used as standard in my application right?

Thanks

Miller

#1243916

Dear Miller,

There is a misunderstanding, the Types custom file field, can only output the file URL, it can not display the PDF file image, the workaround I mentioned above is using HTML codes to do these:
- Display a static PDF image(icon)
- Use Types shortcode to output the file link

See our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#file

#1243983

My issue is resolved now. Thank you!